Page 1 of 1

[a103] fat arrow - no expr and global var ref.

Posted: 09 Jun 2019, 05:36
by Helgef
Issue 1, in debug build:

Code: Select all

(a=>) ; DEBUG: ParseAndAddLine() called incorrectly.
Issue 2,

Code: Select all

a:=0
a()=>a
msgbox a() ; blank
by assigning b:=a()=>a the problem is circumvented.

Cheers.

Re: [a103] fat arrow - no expr and global var ref.

Posted: 10 Jun 2019, 22:40
by lexikos
#1 is a syntax error (missing sub-expression/operand), though the program might not be handling it correctly.

Re: [a103] fat arrow - no expr and global var ref.

Posted: 12 Jun 2019, 03:42
by Helgef
yes, I only realised my mistake after I got the debug error, it wasn't a typo though, I had extrapolated my thought of

Code: Select all

f() => expr
being equivalent to

Code: Select all

f(){
	; global if not nested
	return expr
}
into thinking expr was optional for f()=>, beacuse it is for f(){return}. If possible, I think it would be a pleasing symmetry if expr was optional. Certainly no big deal either way though.

Cheers.

Re: [a103] fat arrow - no expr and global var ref.  Topic is solved

Posted: 24 Sep 2019, 02:26
by lexikos
Fixed in v2.0-a105.