Int and Fix Functions

This program demonstrates the differences between the Int and Fix functions.

'Int and Fix Functions
'Demonstrates the difference between Int and Fix

'Create some double variables
Dim As Double myDouble1 = -5.5, myDouble2 = 5.9
'Show rounding on negative and positive values
Print "Doubles:", myDouble1, myDouble2
Print "Int:", Int(myDouble1), Int(myDouble2)
Print "Fix:", Fix(myDouble1), Fix(myDouble2)
'Try some calculation expressions
myDouble1 = -15.78
myDouble2 = 22.12
Print "Expression:",myDouble1;" +";myDouble2;" = "; Str(myDouble1 + myDouble2)
Print "Int:", Int(myDouble1 + myDouble2)
Print "Fix:", Fix(myDouble1 + myDouble2)

'Wait for keypress