[slang-users] Implicit variable declarations
Robert Milaszewski
rmilas at head.cfa.harvard.edu
Tue Mar 7 09:46:37 EST 2006
Sorry for the confusion I made small typo.
The code should be :
variable x = [1:100:1];
newvar = @x;
is_defined("newvar");
RobertM
Michael Noble wrote:
>>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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jtan.com/pipermail/slang-users-l/attachments/20060307/03670acf/attachment.htm
More information about the slang-users-l
mailing list