View unanswered posts | View active topics It is currently Mon Apr 27, 2026 3:24 am



Reply to topic  [ 10 posts ] 
 For curiosity more than anything... 
Author Message
Chief Warrant Officer

Joined: Sat Jun 05, 2010 2:05 pm
Posts: 152
Location: Indiana (blah)
Unread post For curiosity more than anything...
I had a random thought earlier, as I often do, that popped into my head from out of nowhere... I wasn't even playing at the time, I was out mowing my yard... I'm sure JP could tell me based on the program, but does anybody know the limit to the amount of cash you can store in a cit?

_________________
The lord helps those who help themselves...
For everyone else, there's democrats...


Mon May 30, 2011 11:34 pm
Profile
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1159
Unread post Re: For curiosity more than anything...
5 999's yeah what sing said


Last edited by Comet on Tue May 31, 2011 12:36 am, edited 1 time in total.



Tue May 31, 2011 12:13 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: For curiosity more than anything...
In a cit? According to t-edit...
999,999,999,999,999

That's 5 999's.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue May 31, 2011 12:24 am
Profile ICQ WWW
Chief Warrant Officer

Joined: Sat Jun 05, 2010 2:05 pm
Posts: 152
Location: Indiana (blah)
Unread post Re: For curiosity more than anything...
Interesting, since that is not a flat programming number... Thanks for the info Sing...

_________________
The lord helps those who help themselves...
For everyone else, there's democrats...


Tue May 31, 2011 2:47 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: For curiosity more than anything...
Right, it's larger than a 32bit int, yet it's not a float. Probably 64bit, just trimmed down. Wonder how someone would implement a 64bit int in Pascal like that. That can't be a native data type.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue May 31, 2011 3:22 am
Profile ICQ WWW
Staff Sergeant
User avatar

Joined: Wed Jun 01, 2011 9:45 pm
Posts: 15
Location: Inculcatus, Votivus
Unread post Re: For curiosity more than anything...
Also for consideration there are:

1. ‘Int64’ [-/+9.223-quintillion] or ‘Qword’ [0 to 18.446-quintillion] (which are not compatible with all constructs).
-- or --
2. Variables declared as ‘Integer’ (unset bit lengths are 255).


Thu Jun 02, 2011 5:09 am
Profile
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3151
Location: USA
Unread post Re: For curiosity more than anything...
I just came across this while moderating posts. Sorry I didn't see it earlier. I can give you more details on that.

The citadel treasury field is a Double, which is a 64 bit float. Double was native to the Turbo Pascal compiler Gary was using back in those days. It's a 15 significant digit float and TW only uses the whole number, not the decimal.

After I converted to Delphi 4, a 64 bit integer type was available as a native field type, but I didn't make any change to the use of Double for large numbers. I only recently started using Int64 with this latest release, mostly because all of the new internal timing uses performance counters which return 64 bit integer milliseconds. You can only store about 49 days worth of milliseconds in a dword, but int64 gives you plenty of room. So no game logic currently uses int64, but all of the clock and timing code does.

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Thu Jun 02, 2011 12:40 pm
Profile WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: For curiosity more than anything...
Nice. I didn't remember Pascal having that.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Thu Jun 02, 2011 2:43 pm
Profile ICQ WWW
Chief Warrant Officer
User avatar

Joined: Sun Jan 20, 2008 5:15 am
Posts: 142
Unread post Re: For curiosity more than anything...
A floating number! That explains why you can take all the cash out of a treasury and come back some days later to find 1 credit. It's still compounding the change.


Fri Jun 03, 2011 2:12 pm
Profile
Site Admin
User avatar

Joined: Sun Dec 24, 2000 3:00 am
Posts: 3151
Location: USA
Unread post Re: For curiosity more than anything...
I guess that would be a bug ;)

_________________
John Pritchett
EIS
---
Help fund the TradeWars websites! If you open a hosting account with A2 Hosting, the service EIS uses for all of its sites, EIS will earn credits toward its hosting bill.


Sat Jun 04, 2011 5:33 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.