ZuluScript Reference

From ZuluLog Wiki
(Difference between revisions)
Jump to: navigation, search
Line 57: Line 57:
 
Returns the string value of the field whose name is specified in <tt>string1</tt>.
 
Returns the string value of the field whose name is specified in <tt>string1</tt>.
 
*If the field does not exist for the given record, an empty string ("") is returned.
 
*If the field does not exist for the given record, an empty string ("") is returned.
 +
*For fields of type checkbox, "false" is returned if the checkbox is off, and "true" is returned if the checkbox is on.
 
Example:
 
Example:
 
  var route = getfieldstr("Route");
 
  var route = getfieldstr("Route");

Revision as of 17:29, 30 January 2014

Contents

Operator reference

Operator Description Precedence
() Parentheses 0
+ Unary plus 1
- Unary minus 1
++ Increment 1
-- Decrement 1
! Not 1
* Multiply 2
/ Divide 2
+ Add 3
- Subtract 3
< Less than 4
<= Less than or equal 4
> Greater than 4
>= Greater than or equal 4
== Equal to 5
 != Not equal to 5
&& Logical AND 6
|| Logical OR 7
= Assignment 8
var Declaration 9
if If 9


Function Reference

getfieldstr(string1)

Returns the string value of the field whose name is specified in string1.

Example:

var route = getfieldstr("Route");

getfieldnum(string1)

Returns the numeric value of the field whose name is specified in string1.

Example:

var flttime = getfieldnum("Day Flight Time") + getfieldnum("Night Flight Time"); 

strindex(string1, string2)

Returns the index of the first occurrence of string2 in string1.

Example:

 var idx = strindex("Hello World", "llo");

returns 2.

strequal(string1, string2)

Tests the case-insensitive equality of string1 and string2.

Example:

 var iseq = strequal("Hello World!", "HELLO World!");

returns 1.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox