Jump to content

Extension talk:WSArrays

About this board

2003:E6:F71A:156E:D09C:1B78:6765:C64C (talkcontribs)

I get the warning

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/extensions/WSArrays/src/classes/ComplexArrayPrint.class.php on line 141

when I try to caprint the array. The output is like expected but the warning shows up on the wiki page.

{{#caprint:test[2][Nr]}}


my test array:

1

  • Nr: S2E1

2

  • Nr: S2E2

3

  • Nr: S2E3
Xxmarijnw (talkcontribs)
Reply to "CAPrint"

Compute the difference of arrays

2
Planetenxin (talkcontribs)
Xxmarijnw (talkcontribs)
Reply to "Compute the difference of arrays"
Planetenxin (talkcontribs)

What's the recommended way of creating a copy of an exiting array?

Is it {{#cadefine:new|{{#caprint:old|markup}}}}?

Xxmarijnw (talkcontribs)

Hi Planetenxin,

Currently, the easiest way to copy an array is by doing {{#camerge: new | old | }} I recognize this might be inelegant, and I will probably add a function for this down the road.

Reply to "Copy array"
Planetenxin (talkcontribs)

Hi folks, great extension! I recently tried to create a cross reference table based on the following data:

{{#cadefine:xref|((
"A01":["G 0.19","G 0.21"],
"A02":["G 0.19","G 0.21"],
"A03":["G 0.19"]
))}}

I'd like to use the same syntax pattern, even, if only one value is added, like in "A03". It seems, that "A03" is handled in a different way, because

* {{#caprint:xref[A01]|map|@@}}
* {{#caprint:xref[A02]|map|@@}}
* {{#caprint:xref[A03]|map|@@}}

returns

  • G 0.19G 0.21
  • G 0.19G 0.21
  • Array

instead of

  • G 0.19G 0.21
  • G 0.19G 0.21
  • G 0.19

Is this something you could fix?

Xxmarijnw (talkcontribs)
Reply to "Single value arrays"
There are no older topics