modulo in scripting language
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?
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?
n := m MOD p; // modulo
n := m DIV p; // integer division
senso+++
n := m DIV p; // integer division
senso+++
Olivier Sens
www.brainmodular.com
www.brainmodular.com
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 ?
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 ?
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....
In the V5 you'll be able to user Single, Double & Extended.
...and will be 50x faster....
Olivier Sens
www.brainmodular.com
www.brainmodular.com
I can't wait!
ok, You'll receive a mail to the beta version.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
groovy!
any chance to get a mail for the beta version too?
u can do type casts, btw.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 ?
if i remember correctly its for example:
a := (int) b;
Who is online
Users browsing this forum: No registered users and 19 guests
