Tip for 'floored quotient' or 'integer division'

Per the docs, the math operators are addition (’+’), subtraction (’-’), multiplication (’*’), division (’/’), and modulo (‘mod’). Missing is ‘integer division’ or ‘floored quotient’, which can come in handy.

However, though there is no operator like ‘//’ in Python, for example, for integer division, you can perform this operation another way with very little extra effort.

See e.g. the ‘Variables’ module entry in the doc section.

(It would be nice to have a ‘//’ operator in a future release. :grinning:)

Example workaround:
Capture

Output:
output

Regards,
burque505

2 Likes

Nice one!

Using JavaScript could also come in handy for such cases:

2 Likes

That’s nice too, Skip! Here’s integer division with VBScript:

Output:

id_redux_output

2 Likes