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 / As long, as boolean, as string, as integer, as double integer,

Author
Message
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 19th Sep 2004 12:58
I need an explanation of each of these and I need to know if their is an alternative to "as long" as I cannot seem to use the function in my programs.

Correct me if I am wrong:

1)as integer means an integer
2)as boolean is a 1 or 0 true or false answer
3)as string is basically any text

I am lost with:

4)as DWORD
5)as double integer
6)as long

Could someone explain please?

[image]http://darkbasicpro.thegamecreators.com/userdata/codebase/banners/5057ed3af80eaf1c025458c387cca704.jpg[/image]

1tg46 is my name coding is my game.
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 19th Sep 2004 13:11
a word is 2 bytes, so like 00 - 99 is a word. a dword is a double word, so 4 bytes. 0000-9999. its a byte, so it could be hi for word and blue for a dword. get it?

cant help you with teh other two, sorry

Matt

[url='http://www.ufanz.com/teams/tracking.asp?ti=689&mi=97723][/url]
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Sep 2004 13:24
I don't think there are "long" data types in DBP as the integers are already the size of "long". This chart may help you.


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Sep 2004 20:48
'As DWORD' is a 4 byte unsigned integer
'As double integer' is an 8 byte integer
'As long' - there is no such thing. The equivalent is a standard 'As integer'

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 20th Sep 2004 01:36
Thanks, because I have been trying out some API commands and they required a RECT structure

RECT structure
topright as long
topleft as long
bottomleft as long
bottomright as long
endstucture

I am not sure exactly how this would turn out using as integer instead of as long because it seems like it would return the x and y coordinate of the rect point.

Could someone show an example using this structure, you can get information on this structure from API Guide, and API viewer.

[image]http://darkbasicpro.thegamecreators.com/userdata/codebase/banners/5057ed3af80eaf1c025458c387cca704.jpg[/image]

1tg46 is my name coding is my game.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Sep 2004 02:47
as for boolean, most languages have reserved words of true and false. DB doesn't, so i think anything other than zero is considered true.

"eureka" - Archimedes
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 20th Sep 2004 03:46
Gets the width and height of the desktop




it's cool to hate
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 20th Sep 2004 05:28
Thanks for posting an example. I'll try to work around that sample to help myself to API.

[image]http://darkbasicpro.thegamecreators.com/userdata/codebase/banners/5057ed3af80eaf1c025458c387cca704.jpg[/image]

1tg46 is my name coding is my game.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Sep 2004 07:12
You can use my array plug-in to do this too. Here's an updated version of winchs code:



*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 21st Sep 2004 08:34
Thanks

[image]http://darkbasicpro.thegamecreators.com/userdata/codebase/banners/5057ed3af80eaf1c025458c387cca704.jpg[/image]

1tg46 is my name coding is my game.
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 22nd Sep 2004 05:49
Just downloaded the program so I should be able to try it. Great site by the way.

[image]http://darkbasicpro.thegamecreators.com/userdata/codebase/banners/5057ed3af80eaf1c025458c387cca704.jpg[/image]

1tg46 is my name coding is my game.

Login to post a reply

Server time is: 2024-11-27 10:50:13
Your offset time is: 2024-11-27 10:50:13