User Tools

Site Tools


4rpl:commands:mod2

This is an old revision of the document!


Index

mod2

<-a <-b mod2 ->result

Description

Perform integer division and returns the value (modulo) of the difference. Works differently with negative numbers than mod. Performs this calculation result = a % b; if (result { 0) result += b;

Examples

trace(5 3 mod2) #prints '2'

Index

4rpl/commands/mod2.1611157237.txt.gz · Last modified: 2025/02/14 14:56 (external edit)