#flowscript modulo?

20 messages · Page 1 of 1 (latest)

thorny tusk
#

Pretty much as the title says, does flowscript have an equivalent of c's % operator?

daring atlas
#

it's an ingame function I'm pretty sure, at least in p5, probably same in p3

thorny tusk
#

what's the function called in p5?

daring atlas
#

MOD

#

usage is iirc int m = MOD(5, 2);

thorny tusk
#

I'm assuming Invalid call expression. Expected function or procedure identifier, got: MODmeans it's not a function in p3?

daring atlas
#

maybe it exists, but we just haven't found it

thorny tusk
#

ah

daring atlas
#

we don't have a full list of p3 functions

#

they left them in exe for p5, that's how we know them

#

for p3 it's all manual documentation

#

it definitely should exist though

thorny tusk
daring atlas
#

you can just check jsons in your compilers libraries folder

warm yew
#

% should work as modulo (I just checked and it did compile although I didn't check that it does what I expect it to, but idk what else it would do)

#

The flowscript syntax is very similar to c, if it works in c there's a fairly good chance it'll work in flowscript (for basic stuff at least)

daring atlas
#

oh it has that?

#

how does it look like if you decompile what you just made

warm yew
#

It turns into this which must be the equation that modulo uses

daring atlas
#

right