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 / how do I declare and use a double integar

Author
Message
thedubdude
21
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 8th Nov 2003 22:02
I need to use a double integar but I don't know how to declare it. When I try:

double integer m

I get a compiler error.

Do I need some special hash mark or the like to be associated with the variable m to indicate it is a double integer.

The DBPro help files are of no value here. Thanks.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th Nov 2003 22:04 Edited at: 8th Nov 2003 22:05
edit: whoops sorry,

diMyVar as Double Integer works here.

-RUST-
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 8th Nov 2003 22:04
You need:

m as double integer

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
thedubdude
21
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 8th Nov 2003 22:14
Sorry but : m as double integer
doesn't seem to do the trick. Run the code below and you will find that after 9 zeros (ie. 1000000000) the value of m is wrong. m is still acting like a single integer. Please help.

Thanks.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Nov 2003 23:15
With that code you are shifting the digits along 100 times - double integer only holds up to (I think) 19 digits.



For the general maths and displaying, double integers seem to work fine
thedubdude
21
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 8th Nov 2003 23:30
19 digets would be fine. My code shows that m only hold 10 digits before m is wrong! After index=9 m no longer increase by a factor of 10. Please help. Thanks.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Nov 2003 00:34
Aha, it's actually 18 digits with this code, and the str$() function fails when converting a double integer

thedubdude
21
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 9th Nov 2003 00:56
Great. Thanks for the help.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 9th Nov 2003 14:16
Quote: "double integer m"


hehe a C coder?

"The trouble with the French is that they have no word for 'entreprenuer'" - Pres. George W Bush

Mercenaries in Space demo @ http://www.davidtattersall.me.uk

Login to post a reply

Server time is: 2024-09-21 07:49:30
Your offset time is: 2024-09-21 07:49:30