[slang-users] Implicit variable declarations
Michael Noble
mnoble at space.mit.edu
Tue Mar 7 09:41:16 EST 2006
> I am using slang2 and here is the issue that I encountered
> Consider sample code :
>
> variable x = [1:100:1];
> newvar = @variable;
It is unclear to me how this would even work. "variable" is
a reserved identifier, and so cannot be used in this context.
slsh> variable x = [1:100:1];
slsh> newvar = @variable;
<stdin>:2: Expecting a PRIMARY: found 'variable'
<stdin>:2:<top-level>:Syntax Error
After which
slsh> is_defined("newvar");
returns
0
as expected. What application/version are you trying this within?
HTH,
Mike
More information about the slang-users-l
mailing list