Hi,
another question on whether it's intended (or wise...) or not:
<hansl>
clear
for = 1 # works
print for # prints out 1
function void for(void) # gretl doesn't complain
print "ouf"
end function
for() # error "unexpected ("
</hansl>
First, I'm wondering whether 'for' shouldn't simply be made a reserved
word. One fallout from the present situation is that this:
'loop for(i=0;......'
--i.e. without a blank after 'for'-- doesn't work. No big thing, of course.
Secondly, a totally different thing -- and this applies to every
identifier, not just 'for' as above: If 'for' is already a variable, you
can define a function with the same name, but then you cannot call it.
Wouldn't it be better if gretl already complained when it encounters the
function definition?
thanks,
sven