Almost all commands give an error
The most strange behavior was demonstrated by  'loop'

<hansl>
set verbose off
a_string = "loop = 2"
@a_string
print loop
"string" = bundle
open denmark.gdt
nothing at all
print "nothing at all"
<hansl>

WARNING you may need to close and reopen gretl after running it

Oleh




 


23 лютого 2018, 21:15:06, від "Sven Schreiber" <svetosch@gmx.net>:

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
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel