There seems to be some inconsistencies in the argument syntax in the interpreter. I am using the latest Rakudo. See the following terminal output:
$ perl6
To exit type 'exit' or '^D'
> say: "foo"
foo
> say("foo")
foo
> say "foo"
===SORRY!=== Error while compiling:
Two terms in a row
------> sayβ "foo"
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifier loop
>
$ perl6
To exit type 'exit' or '^D'
> say "foo"
foo
> say("foo")
foo
> say: "foo"
foo
> say "foo"
===SORRY!=== Error while compiling:
Two terms in a row
------> sayβ "foo"
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifier loop
>
$
It seems that after you have used " :" or " ()" to supply arguments, you cannot return to using " ", that is, space, to supply arguments.
Or am I missing something?
Thank!!!
lisprog
source
share