EnglishРусский  

Ads

Scriptius script builder
Provides the best choice in work automation and great time saving features.

CreateInstall
Freeware and commercial installers

Gentee needs your help!
How to advertise with us
 
laptop battery

Numbers

The Gentee language has several numeric types. There are several ways to specify natural numbers or integers.

Decimal form

The most widely used form.

Example: 65, -45367, 0

Hexadecimal form

Numbers must begin with 0X or 0x in this case. Characters from A to F can be used both in the upper case and in the lower case.

Example: 0xВA23, 0x1d2f, 0XFFFFFF

Binary form

Numbers in the binary form must begin with 0b or 0B and consist of only 0 or 1.

Example: 0b11001, 0B1010110110, 0b10101011000011

Character code

You can specify a specific character instead of the number corresponding to it. To do it, enclose this character in single quotation marks.

Example: 'A', '(', 'k', '2', '='

Gentee has such types as long and ulong that occupy 8 bytes each. To define such numbers, add L or l at the end.

Example: 23l, 0xfaafd45fff67fffL, -24363627252652L

Real numbers

There are two types of real numbers: double and float. A number with a decimal point or with a mantissa is of the double type. To define a number of the float type, you should add F or f at the end. To specify a number of the double type without a decimal point and a mantissa, you should add D or d at the end.

Examples of double numbers: 123.122, -123.2е-2, 789D

Examples of float numbers: 12.75f, 0.55F, -78F

Edit