Remote Processing Coorporation RPC-320 Spezifikationen Seite 102

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 186
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 101
Commands - 72
MOD
Operator
SYNTAX: n = a MOD b
PURPOSE: To return the remainder of an integer division.
REMARKS: a is divided by b and the remainder is placed in n.
The arguments a and b are first rounded to integers. These must be in the range from –32,768 to
32,767 (no error messages are given). The division is then done and the quotient is truncated to an
integer.
The sign of the result is always the sign of a.
RELATED: “\” for integer division.
EXAMPLE: PRINT 8 MOD 4 8/4=2 with 0 remainder 0
PRINT 5 MOD 3 5/3=1 with 2 remainder 2
PRINT 7.5 MOD 3 7/3=2 with 1 remainder 1
PRINT –7.5 MOD 3 8/3=2 with 2 remainder –2
ERROR: <Division by zero> – if b is zero
Seitenansicht 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 185 186

Kommentare zu diesen Handbüchern

Keine Kommentare