variable existence checking

Thorsten Haude yoo at vranx.de
Tue May 29 19:39:20 CEST 2007


Hi,

* Tony Balinski wrote (2007-05-29 12:59):
>Quoting Thorsten Haude <yoo at vranx.de>:
>> **typeof( value )**
>>   Returns a string indicating the type of a macro value. The value can be
>>   any NEdit macro language value except for the return value of functions
>>   without a return value. Examples:
>>   typeof(2)                        # -> "INTEGER"
>>   typeof($empty_array)             # -> "ARRAY"
>>   typeof(get_range(10, 20))        # -> "STRING"
>>   typeof(myArray["doesnotexist"])  # -> "UNDEFINED"
>
>I think a typeof function is also useful, but Thorsten's last example involves
>passing a non-value as an argument to a function, currently not allowed. (If
>it were allowed, a number of things would need to change, eg being able to
>save an undefined value in an array. I understand Torsten's patch does
>something like this.)

I'm not sure, that's the part taken from TK's patch #505703. It works
here, though I don't use it intensively.


Thorsten
-- 
There must be a parallel universe where Starbucks sells cocaine in dilute,
controlled, taxed doses, but where (crack) caffiene is sniffed and smoked
in huge binges, and smuggled in by evil Columbian cartels.
    - Rogerborg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.nedit.org/pipermail/discuss/attachments/20070529/b6b63a3c/attachment.bin


More information about the Discuss mailing list