Type Casting

Type-casting Operators convert a value into a specific type.

Symbol Type Name Description Example
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
? Prefix Cast Converts the term to a Boolean ?a
! Prefix Inverse cast Converts the term to a Boolean, and inverts the value !a
String
~ Prefix Cast Converts the term to a String ~a
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/operators/type_casting.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