Core Function IsDeclared

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> IsDeclared( <variable name> ) </pre> === Description === Check if a variable has been declared === Parameters === ==== Expression ==== string representing name of the ...")
 
Line 11: Line 11:
 
==== Expression ====
 
==== Expression ====
  
string representing name of the variable to be checked.
+
String representing name of the variable to be checked.
  
 
=== Return Value ===
 
=== Return Value ===
Line 17: Line 17:
 
Success: Returns 1 if variable has been assigned.
 
Success: Returns 1 if variable has been assigned.
  
Failure: Returns 0 if variable doesnt exist yet.
+
Failure: Returns 0 if variable doesn't exist yet.
  
 
=== Remarks ===
 
=== Remarks ===

Revision as of 20:00, 4 December 2011

IsDeclared( <variable name> )

Contents

Description

Check if a variable has been declared

Parameters

Expression

String representing name of the variable to be checked.

Return Value

Success: Returns 1 if variable has been assigned.

Failure: Returns 0 if variable doesn't exist yet.

Remarks

Example

If (!IsDeclared("a"))
    MsgBox('$a is NOT declared');     // $a has never been assigned
 
$a=1;
 
If (IsDeclared ("a"))
    MsgBox('$a IS declared');      //due to previous $a=1 assignment
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox