Code

FUNCTION Start() AS VOID

? "Basic math tests..."

? 1 + 2

? 1 + 2 * 3 / 4 + 5 + 6

? 100 - 30 - 20

? 100 - ( 30 - 20 )

? 1.2 + 3.4 * 5.6 / 7.8 - 9.10

? 1 + 2.0

? 3.4 + 3 + 1.2 * 5 / 3.2

?

? "Shift tests..."

? 1 << 6

? 32 >> 3

?

? "Modulus tests..."

? 100 % 40

? 100 % 24

?

? "Conversion tests..."

? FLOAT( 25 ) + 1.234872

? INT( FLOAT( 25 ) + 1.234872 )

?

? "Exponentation tests..."

? 2 ^ 3

? 5.1 ^ 7

? 9.23 ^ 2

? 2 ** 3

? 5.1 ** 7

? 9.23 ** 2

?

? "Literal binary and hex constants..."

? 0xffff

? 0xffffffff

? 0xffffffffu

? 0xffffffff

? 0x7f000000u

? 0x7f000000

? 0b100000000000000000000001u

? 0b100000000000000000000001

 

RETURN

 

 
Copyright 2012 GrafX Software DevelopmentTerms Of UsePrivacy Statement     Login