Restored from previous forum. Originally posted by iRoNiC.
A powerfull fonction as ADD (AMOS-amiga) will be so good.
Like :
ADD a,1
a=a+1
ADD a,-5
a=a-5
ADD a,1,0 to 100,0
a=a+1
if a>=100 then a=0
ADD a,1,0, to 100,1
a=a+1
if a>=100 then a=100
ADD a,-5,10 to -250,0
(a=10) a=a-5
if a<=-250 then a=-5
...
Thanx
iRoNiC (French Coder)
Basic Coder
The ADD function (as AMOS)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by geoff.
I agree.
High level language commands should be designed to be clear.
It's the compiler's job to turn this into fast code.
Whether you write
i++
or i=i+1
should make no difference to the final machine code
So why not use the latter, so that everyone can understand it?
Geoff
I agree.
High level language commands should be designed to be clear.
It's the compiler's job to turn this into fast code.
Whether you write
i++
or i=i+1
should make no difference to the final machine code
So why not use the latter, so that everyone can understand it?
Geoff