[Implemented] MOD included into PureBasic

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] MOD included into PureBasic

Post 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 '%')
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post 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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post 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.
Post Reply