Page 1 of 1
delete variable
Posted: Tue Aug 11, 2009 5:14 am
by chris9610
I can not seem to use this command.
The dictionary shows it as Delete Global myvar[17]
The User manual shows it as Delete Variable myvar[17]
neither seems to work for me to delete an array element.
Is this a bug?
Posted: Tue Aug 11, 2009 5:35 am
by mwieder
They do work fine.
Are you saying you can't do
put "hello" into myVar[17]
put myVar[17]
delete variable myVar[17]
put myVar[17]
?
Posted: Tue Aug 11, 2009 1:14 pm
by chris9610
Actually that does work in a script.
I guess my problem was that it was not working from the message box. I get:
Script compile error:
Error description: delete: bad variable expression
Posted: Tue Aug 11, 2009 1:37 pm
by Klaus
Try it in a button to be sure!
The message box has some "funky" issues since the last 3 or 4 versions, which still did not get fixed!
Best
Klaus
Posted: Tue Aug 11, 2009 6:22 pm
by chris9610
In a button delete variable works fine, that I tested. In the message box it still fails.
That's ok as long as it works in the script.
I am just learning runrev and I use the message box to test my script sentences. I was not aware of these issues till now.
Posted: Tue Aug 11, 2009 7:19 pm
by mwieder
No, it works in the message box as well. But you need to use the multi-line message box option (the second icon in the toolbar), not the single line option. The single-line option only knows about its current context, not about anything that has happened in the past. Once you've typed return, that context is gone.