Cicode Programming Reference > Cicode Function Categories > Quality Functions Introduction > VariableQuality

VariableQuality

Extracts the quality from a given variable.

Note: This function is designed to be used within Cicode; using it on graphical pages may result in displaying an error message instead of an expected quality message when either its argument has not good quality or an execution error is set.

Syntax

VariableQuality(Variable)

Variable:

The variable from which the quality will be extracted.

Return Value

The QUALITY of the given variable. If Variable is NULL, it returns quality uncertain (0x40).

Timestamps of uninitialized stack variables, uninitialized code variables and constants are equal to 0 - invalid timestamp, while their qualities are GOOD

Related Functions

QualityCreate ,QualityGetPart, QualityIsGood, QualityIsUncertain, QualitySetPart, QualityIsOverride, QualityIsControInhibit, QualityToStr

Example

INT codeVariable = 1;
INT
FUNCTION
MyFunction(REAL arg1)
STRING str = "My string";
QUALITY q;
q = VariableQuality(codeVariable);  //code variable
q = VariableQuality(arg1); 				 //function argument
q = VariableQuality(str); 			//stack variable
q = VariableQuality(Tag1); 		 //any tag/local variable
 
RETURN 1;
END

See Also

Quality Functions