Array Operators

Array Operators perform various operations on the terms specified. There are several different types of operation available.

Symbol Type Name Description Example
@ Infix Merge Joins the right term to the end of the left term a @ b
@* Infix Repetition Repeats the left term by the number specified by the right term a @* b
. Infix Dot Glues two variable names together to make a reference to an array key a.b
.. Infix Double-dot __CurrentLoop__ shortcut a..b
[ ] Various Square brackets Group together enclosed terms, for Array syntax [ a + b ]
: Infix Colon Key: value pair assignment for for Array syntax a : b
... Infix Range Creates an Array than contains a range of elements from the left term value to the right term value, inclusive a ... b
Type Casting
@ Prefix Cast Converts the term to an Array @a
Type Checking
is Infix IsType Checks if the value of the left term is of the type specified by the right term a is array

Each Operator will evaluate the terms provided as appropriate to the Operator value type - for instance, performing a merge on two Strings will convert the Strings to Arrays first.

ptpscript/operators/array.txt · Last modified: 2007/01/24 10:15
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki