Back to manual index
NewValue := 5 + 1; writeln(NewValue);Returns 6 NewValue := 7 - 5; writeln(NewValue);Returns 2 NewValue := 7 * 5; writeln(NewValue);Returns 35 NewValue := 21 / 3; writeln(NewValue);Returns 7 NewValue := 4 ^ 3; writeln(NewValue);Returns 64 NewValue := 16 #; writeln(NewValue);Returns 4 intValue := 444.2 ~;writeln(NewValue); Returns 444 intValue := 134.7 ~;writeln(NewValue); Returns 135 NewValue := 4 % 2; writeln(NewValue);Returns 0 NewValue := 10 % 3; writeln(NewValue);Returns 1 :: Please note: when doing mathematical operations with variables, GibPascal does left to right operations. :: Example: program mathtest; var testInt : integer; begin testInt := 7 + 10 * 4; writeln(testInt);returns 68 testInt := 10 * 4 + 7; writeln(testInt);returns 47 |