Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[pugs] misleading compiler message

10 views
Skip to first unread message

Terrence Brannon

unread,
Mar 7, 2005, 7:13:56 AM3/7/05
to perl6-c...@perl.org
The following program:
---------------------

my @first_set = qw(1 1 1 1 1 1 1 1 1 1 1 1 1 1);
my @new_set = qw(1 2 1 1 1 1 1 1 1);

if (any(@first_set) != any(@new_set)) {
"a fluctuation in the readings has been detected" . say;
}

Yields this error message:
-------------------------

terry@Abulafia:~/perl/talks/p6-junctions$ pugs any-any.p6

unexpected "{"
expecting term postfix, operator, postfix conditional, ternary conditional, ";" or end of input
NonTerm "any-any.p6" (line 4, column 39)

Abutting the period to the string yields a running program:

my @first_set = qw(1 1 1 1 1 1 1 1 1 1 1 1 1 1);
my @new_set = qw(1 2 1 1 1 1 1 1 1);

if (any(@first_set) != any(@new_set)) {
"a fluctuation in the readings has been detected".say;
}

The error message had me staring at the line above the "..." . say
because it said there was a problem with the open bracket.

--
Carter's Compass: I know I'm on the right track when,
by deleting something, I'm adding functionality.

0 new messages