The analyzer complains "error 5025: Expression continues past logical end" about line 6
but line 6 does work as intended. Maybe analyzer needs a tweak? Not sure.
(PS: I'm loving the new maps.)
Const = MapCreate()
ptrglobaldefine(Const)
Const["mastertitle"] = "Fancy"
#definefunction croak(a,c)
mt = *ptrGlobal(Const)["mastertitle"]
terminate(a,mt,c)
return
#endfunction
croak(1,"bye bye")
exit
I can't replicate your code, but maybe move the function at the beginning of the script, or after exit as a gosub :UDFS
Good idea, I'll try it....
...nope, it just follows the line around where ever you put it.
I think the syntax analyzer is just not fond of the syntax on that line.
You certainly like to play with WIL pointers. The problem in the syntax analyzer is not specific to WIL maps. You can reproduce it using conventional WIL arrays as well. The analyzer does not like a function call preceding the array expression in this case. We will get it straightened out for the next release.
As per usual, thanks for reporting the problem.
You won the dailydouble. Run the following through the Analyzer and the WBS debugger.
#definefunction Useless(_p)
return _p
#endfunction
a[0] = 1
x = *Useless(&a)[0]
One final note on the subject. Array brackets probably should not be permitted following function calls in WIL statements for syntax consistency's sake. But once the cat is out there is no putting it back in the bag.
QuoteYou certainly like to play with WIL pointers
Guilty as charged, sir!
Quote from: td on April 30, 2019, 09:13:28 AMOne final note on the subject. Array brackets probably should not be permitted following function calls in WIL statements for syntax consistency's sake. But once the cat is out there is no putting it back in the bag.
Thanks for making allowances for our cats Tony! :)
_,'| _.-''``-...___..--';
/_ \'. __..-' , ,--...--'''
<\ .`--''' ` /'
`-';' ; ; ;
__...--'' ___...--_..' .;.'
(,__....----''' (,..--''