January 2006
Beginner
592 pages
16h 55m
English
div
integer division
number1divnumber2
Obtains the integer part of a division. Both numbers are treated as reals; the first is divided by the second, and the result is coerced to an integer by throwing away its fractional part. Notice that this is not the same as AppleScript's normal real-to-integer coercion
behavior. Thus, the way to get the integer part of a real in AppleScript is x div 1, not x as integer.
4 div 5 -- 0 (4 / 5) as integer -- 1
Read now
Unlock full access