; Floor Example ; ------------- ; Floor rounds DOWN to the next whole number, and returns it as a ; float. Compare Ceil (always rounds up) 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 "Floor(2.7) drops to 2.0, but Floor(-2.3) drops DOWN to -3.0:" Print "it does not simply chop off the fraction." Print "" Print "Press any key to close the example" WaitKey End