variable existence checking

Thorsten Haude yoo at vranx.de
Tue May 29 15:43:14 CEST 2007


Hi,

* A.V.Kuznetsov wrote (2007-05-29 13:27):
>Is it possible to extend macro language by checking of a (global?)
>variable existence? I think, such a checking is very helpful, since
>macro execution is broken when undefined variable is called.

I (with TK's help) did something similar for my Patch Collection:
https://sourceforge.net/tracker/index.php?func=detail&aid=1058246&group_id=11005&atid=311005

From the documentation:
**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.e. new logical operator !! "existence" can be defined.

I don't think that would be necessary.


Thorsten
-- 
Fear leads to anger. Anger leads to hate. Hate leads to
using Windows for mission-critical applications.
-------------- 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/53f21ce4/attachment.bin


More information about the Discuss mailing list