divmod

/%

perform integer division between given values and return tuple with quotient and remainder


Parameters

divmod valueA :integer :floating :complex :rational :literal :quantity
       valueB :integer :floating :complex :rational :quantity

Returns

  • :block
  • or  :nothing

Examples

copy
print divmod 15 5 ; 3 0 print 14 /% 3 ; 4 2

copy
[q,r]: 10 /% 3 ; q: 3, r: 1

copy
a: 6 divmod 'a 4 ; a: [1, 2]

Related