Fix = liefert den ganze Zahlteil einer Kommazahl       zurueck.htm

Fix

Value = Fix ( Number )

Returns the integer part of a number.

Example :

PRINT Fix(Pi)

=> 3

PRINT Fix(-Pi)

=> -3

Vergleiche auch den Befehl Int

Beispiel :

PUBLIC SUB Button1_Click()

DIM x AS Integer

DIM a AS Float

a = -3.456

FOR x = 1 TO 10

a = a + 1

PRINT a, Fix(a)

NEXT

END

Ergebnis :

-2,456 -2

-1,456 -1

-0,456 0

0,544 0

1,544 1

2,544 2

3,544 3

4,544 4

5,544 5

6,544 6