Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is mod?

Asked by 8 years ago

Once upon a time, jaffy was scripting and was typing model. Then this happened

https://gyazo.com/96cf56ce374325067509a9a4d2487f89

amazed, he had to investigate. To the wiki he went. The best thing he found is....

http://wiki.roblox.com/index.php?title=Moderators

But this isn't it, is it?

2 answers

Log in to vote
0
Answered by 8 years ago

Prior Version

Believe it or not, the keyword mod was a function used for calculating modulus in an earlier version of Lua [Lua 4]. Now, however, the current infix notation for modulus is %

I may be wrong but I believe that the syntax highlighting for mod has been kept by mistake. There is also a possibility that the keyword is reserved for a method of a specific instance - but nothing comes to mind.

0
`mod` was a function, not an operator: http://www.lua.org/manual/4.0/manual.html#6.3 BlueTaslem 18071 — 8y
0
Edited. Thank You. DigitalVeer 1473 — 8y
Ad
Log in to vote
1
Answered by
Validark 1580 Snack Break Moderation Voter
8 years ago

Could you be referring to Modulus, often shortened to Mod?

Modulus is the remainder of the division problem with the same numbers. Example:

(Note that % is the symbol used to represent modulus)

-- 10 % 3:
-- 10 / 3 = 3 + R1 (R is remainder)
-- 10 % 3 = 1

Answer this question