======Array Operators====== Array Operators perform various operations on the terms specified. There are several different types of operation available. ^ Symbol ^ [[PTPScript:Operators#Operator Types|Type]] ^ Name ^ Description ^ Example ^ | **[[Arithmetic|Arithmetic]]** ||||| | %% @ %% | 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 %%'' | | **[[Glue|Glue]]** ||||| | %% . %% | Infix | Dot | Glues two variable names together to make a reference to an array key | ''%% a.b %%'' | | %% .. %% | Infix | Double-dot | **''%%__CurrentLoop__%%''** shortcut | ''%% a..b %%'' | | **[[Grouping|Grouping]]** ||||| | %% [ ] %% | Various | Square brackets | Group together enclosed terms, for [[PTPScript:Types:Array|Array syntax]] | ''%% [ a + b ] %%'' | | %% : %% | Infix | Colon | Key: value pair assignment for for [[PTPScript:Types:Array|Array syntax]] | ''%% a : b %%'' | | **[[Range|Range]]** ||||| | %% ... %% | 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|Type Casting]]** ||||| | %% @ %% | Prefix | Cast | Converts the term to an Array | ''%% @a %%'' | | **[[Type Checking|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 [[PTPScript:Types|value type]] - for instance, performing a merge on two Strings will convert the Strings to Arrays first.