Welcome to %s forums

BrainModular Users Forum

Login Register

modulo in scripting language

I need help on a Patch
Post Reply
oxyredox
Member
Posts: 44
Location: Paris
Contact:

Unread post by oxyredox » 01 Nov 2009, 14:09

hi folks!

I'm working on a patch aiming at some special management for a cicular speaker arrangement. I've searched through the brilliant sripting tutorial but could'nt find any mention of the modulo opeator which is wohever quite common in Pascal (if I remember well).
I can create the function within the script, but I guess my script would be much more efficient if it was a built-in function.

Am I wrong or does it exist?

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 01 Nov 2009, 14:53

n := m MOD p; // modulo
n := m DIV p; // integer division

senso+++

oxyredox
Member
Posts: 44
Location: Paris
Contact:

Unread post by oxyredox » 01 Nov 2009, 15:22

THanx,
I had tried " n := m mod p;" and it could'nt compile...
but now that I think of it, it must have been a problem of type since m was a float...

Other question, I tried a script with a declaration such as

var n : extended;

and the compilator asnwers

extended no such type

where is the problem ?

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 01 Nov 2009, 15:37

in Usine V4 on the Single type is allowed.
In the V5 you'll be able to user Single, Double & Extended.
...and will be 50x faster....


User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 01 Nov 2009, 17:28

ok, You'll receive a mail to the beta version.


amiga909
Member
Posts: 324
Contact:

Unread post by amiga909 » 03 Nov 2009, 14:18

any chance to get a mail for the beta version too?

amiga909
Member
Posts: 324
Contact:

Unread post by amiga909 » 03 Nov 2009, 14:20

oxyredox wrote:THanx,
I had tried " n := m mod p;" and it could'nt compile...
but now that I think of it, it must have been a problem of type since m was a float...

Other question, I tried a script with a declaration such as

var n : extended;

and the compilator asnwers

extended no such type

where is the problem ?
u can do type casts, btw.
if i remember correctly its for example:
a := (int) b;

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests