======Type Casting====== Type-casting Operators convert a value into a specific [[PTPScript:Types|type]]. ^ Symbol ^ [[PTPScript:Operators#Operator Types|Type]] ^ Name ^ Description ^ Example ^ | **[[Number|Number]]** ||||| | %% + %% | Prefix | Cast | Converts the term to a Number, without affecting the sign | ''%% +a %%'' | | %% - %% | Prefix | Inverse cast | Converts the term to a Number, and inverts the sign | ''%% -a %%'' | | **[[Boolean|Boolean]]** ||||| | %% ? %% | Prefix | Cast | Converts the term to a Boolean | ''%% ?a %%'' | | %% ! %% | Prefix | Inverse cast | Converts the term to a Boolean, and inverts the value | ''%% !a %%'' | | **[[String|String]]** ||||| | %% ~ %% | Prefix | Cast | Converts the term to a String | ''%% ~a %%'' | | **[[Array|Array]]** ||||| | %% @ %% | Prefix | Cast | Converts the term to an Array | ''%% @a %%'' | The inverse Boolean cast Operator is the same as the logical NOT operator. ===Additional Information=== * [[PTPScript:Types:Array#Converting to Array|Converting to Array]] * [[PTPScript:Types:Boolean#Converting to Boolean|Converting to Boolean]] * [[PTPScript:Types:Number#Converting to Number|Converting to Number]] * [[PTPScript:Types:String#Converting to String|Converting to String]]