Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / decrementing variables in array data

Author
Message
kRx
20
Years of Service
User Offline
Joined: 2nd Apr 2005
Location: Canterbury, Kent, UK
Posted: 21st Aug 2005 21:39
how do i decrement(dec) numerical variables from data in an array? i couldnt find anything useful in the manual, so sorry if its in there somewhere.

thanks

kR

kR
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Aug 2005 21:45
Dim A(10)
A(1)=10
Temp = A(1): Dec Temp: A(1) = Temp
Print A(1)

TDK_Man

Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 21st Aug 2005 21:45
OR

dim a(10)
a(1) = a(1) - 1
print a(1)

Immunity and Annihalation makes Immunihalation...
kRx
20
Years of Service
User Offline
Joined: 2nd Apr 2005
Location: Canterbury, Kent, UK
Posted: 21st Aug 2005 22:53
thanks again guys, trying to fix a few bugs

kR
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Aug 2005 23:50
Sven B:

Yes I forgot about that way. (Looks for an embarassed smiley but can't find one)...

It's a much better method than what I suggested!

TDK_Man

kRx
20
Years of Service
User Offline
Joined: 2nd Apr 2005
Location: Canterbury, Kent, UK
Posted: 21st Aug 2005 23:54
thats a n embarresed smiley

kR
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 22nd Aug 2005 09:28
People make mistakes (mostly me), nothing to do about it...

Immunity and Annihalation makes Immunihalation...

Login to post a reply

Server time is: 2025-05-22 15:17:26
Your offset time is: 2025-05-22 15:17:26