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 / pointers/references to variables

Author
Message
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 13th Mar 2010 01:36
in C++ and (i think) VB you can create a reference or pointer to a variable, these being kindof nicknames for variables. they refer to the data in the variable they point to without allocating additional memory for a 2nd copy of the variable.

i was wondering is there any way to create a pointer in DBP?

Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 13th Mar 2010 05:00 Edited at: 13th Mar 2010 05:02
did you read the help file of dbpro?

Look in Principles->Datatypes and variables-> at the bottom of the help page you have a section about pointers

God is real unless declared integer.
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 13th Mar 2010 05:01
nope......should i have?

rofl i prolly shudve checked ther first

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Mar 2010 20:37
Quote: "nope......should i have?"


Considering the answer is there...

Yes.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
Benjamin
23
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 14th Mar 2010 20:39
No, you cannot create pointers or references to variables. However, DBPro does have very basic pointer functionality that allows you to address memory in DWORDs.

That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 14th Mar 2010 21:35
o ok, it doesnt really matter anyway. i mean the pointers would save me like 14 bytes of memory.......not exactly a life-threatening amount

Login to post a reply

Server time is: 2026-07-26 23:41:05
Your offset time is: 2026-07-26 23:41:05