Up

varGet

Return the value of any global variable (create with varAdd or not)

This function should be used by advanced developers only.

Prototype :

fun [S u0] u0

Return : u0 the value or nil if error/not found.

See also :

varAdd

varSet

Example

struct Client [
	cid = I,
	cname : S,
	cmail : S,
	cregister : S
	] mkClient;;

fun main ()=
	_showconsole;
	_fooId varAdd "varI" "I" "2";	// create varI, type = I, initial value = 2
	_fooId varAdd "varF" "F" nil;	// create varF, type = F, without initial value
	_fooId varAdd "myVarS" S "\"Hello !\"";	// create myVarS, type = S, initial value = "Hello"
	_fooId varAdd "varC" "Client" nil;	// create varC, type = Client, without initial value
	
	_fooId 3 + varGet "varI" nil;	// 5
	
	_fooS strcat "text is : " varSet "myVarS" "Hello World";
	0;;