Identifiers in the workflow script language are the names that you give your variables and functions, and the keys that map objects use.

You are free to choose any identifier as long as you conform to the following restrictions:

  • the reserved keywords var, foreach, for, using, trace, if, continue, and break are not allowed as identifiers

  • only the underscore (_) and Unicode letters are allowed as starting characters, numeric characters are not

var _k = 1;
trace _k; // 1
/* These declarations would throw a
'mismatched input...' error
  var $j = 2;
  var 6z = 3;
  var foreach = 4;

Alternately, you are free to ignore any of the restrictions above if you declare and reference your identifiers inside single quotes (').

var '$j' = 5;
trace '$j';        // 5
var '6z' = 6;
trace '6z';        // 6
var 'foreach' = 7;
trace 'foreach';   // 7