| 4D v18Undefined | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v18
 Undefined 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Undefined ( expression ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| expression | Expression |   | Expression whose resulting value to be evaluated | |||||
| Function result | Boolean |   | True = undefined, False = not undefined | |||||
Undefined returns True if the result of the evaluation of expression is not a defined value, and False otherwise.
Note: Keep in mind that Undefined evaluates expression. The following statements are equivalent:
 $result:=Undefined($exp)
  // same result:
 $result:=(Value type($exp)=Is undefined) $result:=(Type($ptr->)=Is undefined) //true if the pointed variable does not exist (no error)Here are the different results of the Undefined command as well as the Null command with object properties, depending on the context:
 C_OBJECT(vEmp)
 vEmp:=New object
 vEmp.name:="Smith"
 vEmp.children:=Null
 
 $undefined:=Undefined(vEmp.name) // False
 $null:=(vEmp.name=Null) //False
 
 $undefined:=Undefined(vEmp.children) // False
 $null:=(vEmp.children=Null) //True
 
 $undefined:=Undefined(vEmp.parent) // True
 $null:=(vEmp.parent=Null) //True
	Product:  4D
	Theme:  Language
	Number:  
        82
        
        
        
	
	Modified:  4D v11 SQL  
	Modified:  4D v16 R4
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
	
 Add a comment
Add a comment