Page 1 of 1

[Implemented] MOD included into PureBasic

Posted: Wed Jun 05, 2002 7:08 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.

From the german forum wishlist.

NicTheQuick´s wish for PureBasic:
Include MOD directly into PureBasic.

Code: Select all

x = 270 MOD 256
instead

Code: Select all

x = iMOD(270,256) ; with external library

German PureBasic Forum, http://www.Pure-Board.de



Edited by - Danilo on 11 June 2002 06:07:05

(Implemented as '%')

Posted: Thu Jun 06, 2002 5:15 am
by BackupUser
Restored from previous forum. Originally posted by plouf.

What's MOD ?
anyway some mathematic epressions should be
internal as discussed in the past incuding Pow
(^) :)


Christos

Posted: Thu Jun 06, 2002 5:34 pm
by BackupUser
Restored from previous forum. Originally posted by traumatic.
What's MOD ?
MOD returns the remainder obtained by dividing its operands.
So, x MOD y would be the same as x – (x/y) * y.

Hope this helped.