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 Professional Discussion / DOUBLE INTEGER not working

Author
Message
Ratty Rat
17
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 24th Sep 2002 20:50
Amazingly (given that I just installed the DBPro Demo yesterday, and am simply trying to convert an old DB program) I have found another problem, is this just me or does the problem below happen to the rest of you too.

Basically the following bit of code is supposed to show the same number for each of the variable i(1), j(1) and k, but instead it, quite astoundingly, gives 3 different answers, with only k being correct! :-

TYPE Col
colour AS DOUBLE INTEGER
ENDTYPE
DIM j(1) AS Col
DIM i(1) AS DOUBLE INTEGER
k AS DOUBLE INTEGER

i(1) = RGB(255,255,255)
j(1).colour = RGB(255,255,255)
k = RGB(255,255,255)
print "RGB = " + str$(RGB(255,255,255))
print "i(1) = " + str$(i(1))
print "j(1) = " + str$(j(1).colour)
print "k = " + str$(k)

wait key
Overdroid
17
Years of Service
User Offline
Joined: 22nd Sep 2002
Location:
Posted: 24th Sep 2002 22:53
I think there are issues with the array code and this may be causing the problem.

For example the following code produces 0 as output:




And this code:



Won't even compile for me. I get a "cannot perform 'dword' cast on type '@test$(0)' at line 7" error.

I'm sure it'll be fixed in a patch.

"Talk is cheap because supply exceeds demand."
- Unknown.
Ratty Rat
17
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 25th Sep 2002 18:23
I certainly hope this and all the other problems I have come across (such as the Select...case statements not working with strings, also posted here) are fixed soon.

These are pretty fundamental problems and frankly I don`t see me buying the full version until I know they are fixed!

Login to post a reply

Server time is: 2019-11-17 15:19:13
Your offset time is: 2019-11-17 15:19:13