; Ceil Example ; ------------ ; Ceil rounds UP to the next whole number, and returns it as a float. ; Compare Floor (always rounds down) and Int (rounds to the nearest ; integer) - negative values are where the three differ most. Print " value Ceil Floor Int" Print "------------------------------------" ; Each Read pulls the next sample value from the Data line below For i=1 To 6 Read v# Print RSet(v,10)+RSet(Ceil(v),10)+RSet(Floor(v),10)+RSet(Int(v),6) Next Data 2.3,2.7,2.5,-2.3,-2.7,-2.5 Print "" Print "Ceil(2.3) goes up to 3.0, but Ceil(-2.3) goes UP to -2.0:" Print "up always means towards positive infinity." Print "" Print "Press any key to close the example" WaitKey End