next up previous contents index
Next: The strcmp Command Up: WRspice Commands Previous: The cdump Command   Contents   Index


String Comparison and Global Return Value

These commands are used for string comparison, and for setting the global return value. The global return value is an internal global variable that can be set and queried from any script (with the $? construct). This can be used to pass numeric data to or from a script, but one must take care that the value is not overwritten before use, as its scope is global. The string comparison functions return their comparison result in the global return value. There is no native string data type in the scripting language, and the commands here provide basic string support.

strcmp Compare strings
strcicmp Compare strings, case insensitive
strprefix Check if string is prefix of another
strciprefix Check if string is prefix of another, case insensitive
retval Set the global return value



Subsections
next up previous contents index
Next: The strcmp Command Up: WRspice Commands Previous: The cdump Command   Contents   Index
Stephen R. Whiteley 2017-10-02