Function Entry: REM
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: REM
Name
rem
Class
Function
Syntax
(rem [number number ...])
Arguments and Values
number: zero or more integers or reals.
Description
Divides the first number by the second, and returns the remainder. With more than two arguments, evaluates left to right: the remainder of (rem n1 n2) is divided by n3, and so on. With no arguments, returns 0; with a single argument, returns that argument.
Return Values
If any argument is a real, the result is a real; otherwise the result is an integer.
Side Effects
None.
Examples
(rem 42 12)returns6.(rem 12.0 16)returns12.0.(rem 26 7 2)returns1((26 mod 7) = 5, then(5 mod 2) = 1).
Availability
- AutoCAD 2026: documented.
- BricsCAD V26: documented under the same name
remand additionally providesmod. See Phase 4 cross-reference to BricsCADmod. - Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [rem (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-4CC43BEB-3215-41AE-839B-2DCE6354241A.htm)
- Status: documented (Phase 3 body fill).