======base====== Convert a [[PTPScript:Types:Number|Number]] or numeric [[PTPScript:Types:String|String]] between numeric bases. \\ **Syntax** * ''[[PTPScript:Types:String|String]] base( [[PTPScript:Types:Mixed|Mixed]] subject, [[PTPScript:Types:Number|Number]] from, [[PTPScript:Types:Number|Number]] to [, [[PTPScript:Types:String|String]] fromchars [, [[PTPScript:Types:String|String]] tochars ] ] )'' \\ **Parameters** * [[PTPScript:Types:Mixed|Mixed]] ''subject'' - The number to convert. * [[PTPScript:Types:String|String]] - The String will be treated as a number of base ''from''. There is no practical limit to the length that can be handled. * [[PTPScript:Types:Number|Number]] - The Number will be treated as a number of base ''from''. If the number is too big to hold as a standard number, it should be given as a String. * [[PTPScript:Types:Number|Number]] ''from'' - The numeric base to convert from. * [[PTPScript:Types:Number|Number]] ''to'' - The numeric base to convert to. * [[PTPScript:Types:String|String]] ''fromchars'' - The character list to use for the ''from'' base. If omitted, it will default to the numbers 0-9 followed by the letters a-z. This gives a maximum of base 36. If higher bases are to be used, longer strings need to be specified, up to a maximum of 256. * [[PTPScript:Types:String|String]] ''tochars'' - The character list to use for the ''to'' base. If omitted, ''fromchars'' will be used. \\ **Result** * [[PTPScript:Types:String|String]] - The converted number, in String form. Returns a String containing numeric ''subject'' converted to a different numeric base.