FANDOM

1,086,627 Pages
Welcome! Enter your question below. Please use words like "Who, What, Where, When, Why, How, etc..." in your question. Nothing to ask? Click here for a random, un-answered question.

The div operator is for the integers. We have the / (slash) operator for real types.

15 div 3 = 5

16 div 3 = 5

7 div 4 = 1

4 div 7 = 0

4 / 7 = 4.0 / 7.0 = 0.57142857143

To take only the integer part, use the Int function (it returns a real) or the Trunc function (retuns an integer):

Int(4.0 / 7.0) = Int(0.57142857143) = 0.0

Trunc(4.0 / 7.0) = Trunc(0.57142857143) = 0

Trunc(100.0 / 23.0) = Trunc(4.347826087) = 4

See also the Round function.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.