Numbers

Top  Previous  Next

Scripts > Token definitions > Predefined tokens > Numbers

 

The following predefined tokens can be inserted in a project by a pop-up menu.

 

 

INT:        \d+

 

A natural number (integer) simply consists in one or more digits. The class of all digits is predefined as '\d'.

 

REAL:        (\d+\.\d*|\.\d+)([eE][\+\-]*\d+)?

 

A real number, either begins with a dot or with a dot preceded by an integer. The dot is followed by an arbitrary number of digits and optionally by an exponent expression. A dot without an adjoining digit is not a real number.

 

Examples: .1; 1.;1.1; 3.14, 6.626E-34

 

 

HEX_PAS:        \$[[:xdigit:]]{1,8}

 

A hexadecimal number as used in the programming language pascal: a dollar character followed by up to eight digits or letters from 'A' to 'F' or 'a' to ''f'.

 

HEX_CPP:        \$[[:xdigit:]]+

 

A hexadecimal number as used in the programming language c++: "0x" followed by several digits or letters from 'A' to 'F' or 'a' to ''f'.

 

 

 



This page belongs to the TextTransformer Documentation

Home  Content  German