DIV
A binary operation giving the integer quotient of two items. The result is always an integer.
X=A DIV B
y=(top+bottom+1) DIV 2You can use this function to give the ‘whole number’ part of the answer to a division. For example,
21 DIV 4would give 5 (with a ‘remainder’ of 1).
Whilst it is possible to use DIV with real numbers, it is really intended for use with integers. If you do use real numbers, BBC BASIC(Z80) converts them to integers by truncation before DIViding them.
Syntax
<n-var>=<numeric> DIV <numeric>Associated Keywords
MOD
Last updated on