You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Result:
Potential difficulties:
Leading 0 does not indicate octal in Perl 6. Please use 0o2 if you mean that.
at -e:1
------> say 02⏏<EOL>
2
To see the problem with this error message, let's see this task from thinkperl6 book:
3. In math notation, leading zeros are OK, as in 02. What happens if you try this in Perl?
Indeed, sometimes you'd think that leading zeros should do nothing. In fact, I remember myself writing numbers with leading zeros a couple of times, and I remember zero times I actually needed something in octal.
Is there any way we can improve the error message so that it includes this situation as well (i.e. using leading zeros to mean nothing)? Please also consider that 6 year old kids may not know what octal is, but the error message should be understandable anyway.
On Thu, 25 May 2017 05:35:42 -0700, alex.jakimenko@gmail.com wrote:
Code:
say 02
Result:
Potential difficulties:
Leading 0 does not indicate octal in Perl 6. Please use 0o2 if you
mean that.
at -e:1
------> say 02⏏<EOL>
2
To see the problem with this error message, let's see this task from
thinkperl6 book:
3. In math notation, leading zeros are OK, as in 02. What happens if
you try this in Perl?
Indeed, sometimes you'd think that leading zeros should do nothing. In
fact, I remember myself writing numbers with leading zeros a couple of
times, and I remember zero times I actually needed something in octal.
Is there any way we can improve the error message so that it includes
this situation as well (i.e. using leading zeros to mean nothing)?
Please also consider that 6 year old kids may not know what octal is,
but the error message should be understandable anyway.
Migrated from rt.perl.org#131361 (status was 'resolved')
Searchable as RT131361$
The text was updated successfully, but these errors were encountered: