Welcome

User: Pass:   register


This identifier literally returns nothing.

Format

$null

Parameters

None.

Properties

None.

Points To Note

The different between $null and a non-existent identifier is that $null cannot be overwritten. $null is usually used to check the existence of something.

Examples

//if ($null == $null) echo -a yes

Output: yes

//echo -a $null

Output: * /echo: insufficient parameters

Hacks

$null(<identifier>) can be used to force <identifier> to be evaluated without returning a value to the calling command but it will only work if you don't have a custom alias called null.
This can be useful for things like COM and regular expressions.

The following is a regular expression example of how this could be useful. This shows how you don't have to store the result of the $regex anywhere but you can still access $regml.

//echo -a $null($regex(testing this,/ (.+?)$/)) $regml(1)

There are, however, better and more fool proof ways of doing this. To read about these look at $and, $or or $xor.

Related Articles

None.

Related Commands

None.

Related Events

None.

Related Identifiers

$true, $false






© 1996-2010 hdesk.org and dalnethelpdesk.com