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 / Yet 2 more basic but troublesome questions

Author
Message
JSCskycap
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Townsend, MA, USA
Posted: 12th Oct 2003 06:11
I beg patience here but I have a couple of seemingly ridiculous questions that I can't seem to find answers to.

1 - Is there a limit on the value a numerical variable can have? My program uses dollar values in one place and, as you're dealing with commercial aircraft purchasing, you are talking about hundreds of millions of dollars. I get bizarre numbers once I go into the early millions. Is there an upper limit? I've found no info on this.

2 - Is there a way to format numerical variables to place commas every 3 digits? I have a rather complex routine setup - but there must be an easier way than dividing by 1000, subtracting the integer of that value and then multiplying by 1000 and sticking a comma between them, right?

Thanks!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Oct 2003 12:08
Ok, to answer these questions... I'm gonna need a pair of tweezers, a bucket, 3 dogs (preferably black) and some Orange Soda. Bring all this to the toilets behind the fridge and we can get to work...

... Ok, now that's done...

1) I am not sure if there is an upper limit, you are ussually anly limited by your imagination in programs like DarkBASIC (excluding the bugs etc of course). Best off to seek advise from one of the Moderators.

2)Yes there is a way, but you have to do it manually... Here's something i just whipped up...



And to use the same example with array's, (commented) use:



Hope I Helped...

Knowladge Belongs To The People...
JSCskycap
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Townsend, MA, USA
Posted: 13th Oct 2003 01:06
Well, that's a lot simpler than I had! Great stuff - Thanks!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 13th Oct 2003 05:55
Hey, that's cool man, just ask and you'll get the help...

Knowladge Belongs To The People...

Login to post a reply

Server time is: 2025-05-21 14:53:48
Your offset time is: 2025-05-21 14:53:48