Table of Contents
setDescriptionSet the value of a variable. This is equivalent to the '=' assignment operator in C/C++. Function prototypevarref set <varref:var> <variant:VarValue> Arguments
Return valueNULL if an error occurred, and a valid variable reference otherwise (same as var argument). ExampleSet value of integer from literalint i set i 50 Set value of string from literalstring s set s "hello" Set value of string from a variablefloat f // create a float 'f', and initialise set f 123.456 string s // create a string 's' set s f // set the value of 's' to be 'f' (this is like 'sprintf(s, "%f", f)' in C) echo s // echo value of string to event log … the output of which is written to the event log by echo as: 123.456 Set value of an integer from a fucntionint i set i <zs:GetLineNo> // set value of 'i' to be current line number (i.e. 2) echo i … the output of which is written to the event log by echo as: 2 CommentsNone. See alsoExcept where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|