On Wed, 13 May 2015, Sven Schreiber wrote:
Am 13.05.2015 um 09:41 schrieb Sven Schreiber:
> a new thingy:
> function void scheck (int a, string *s)
> printf "%s\n", s
> end function
> string hey = "ho"
> scheck(2, &hey)
And I just discovered that not using the pointer form seems to work with a
null default value:
function void scheck (string s[null])
I'm mentioning this because according to the docs under the
heading "Function parameters: optional refinements" it says: "For
optional pointer and list arguments (see section 13.4), the
special default value null." So this case isn't covered by the
Right enough; it should be.
OTOH if I try this null value with an integer argument (and no
pointer), it indeed does _not_ work.
Maybe we're being unduly influenced by the fact that in the C world
a string is already a pointer-y thing.