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.

Newcomers DBPro Corner / DEC command. How to use?

Author
Message
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 19th Feb 2003 10:59
Ive seen the DEC command used a few times but i dont know what it does. Can someone explain it to me? The manual doesnt help...
--------
I HAVE SOME IDEA HOW TO PROGRAM DARK BASIC!
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 19th Feb 2003 11:27
x = 10
dec x

x will now = 9

or

x = 10
dec x,5

x will now = 5

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 19th Feb 2003 16:25
And while your at it- the inc command!

x=10
inc x

x now =11

or

inc x,5
x now =15



RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 17:10
INC and DEC are just quick ways of adding or subtracting numbers.

INC = + 1
INC [var],i = [var] + i

DEC = + 1
DEC [var],i = [var] + i

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.

Login to post a reply

Server time is: 2024-09-19 18:00:58
Your offset time is: 2024-09-19 18:00:58