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 you use pointers

Author
Message
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 16th Sep 2002 19:27
I can get the first byte out of an address pointed to by a variable : (*addr), but how do you get the others - do you have to inc addr each time ?
Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 16th Sep 2002 21:49
... read up on references and pointers... i cant explain it in something short...
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Sep 2002 12:00
Unfortunatly in the manual it just states that you need a * before the variable name. The only way I've got it to work is to increase the address each time (which is not always viable).

Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 19th Sep 2002 09:10
=P the reference and pointer stuff you want to read up on is more of c++ to understand what your doing when you use those commands... just saying you need a * infront of a variable will prob end up with a memory leak... and if your lucky that will crash your comp... i guess dbpro has something wierd that takes care of it...
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 20th Sep 2002 12:54
The main problem is that *(addr) works okay, but *(addr+3), for example doesn't. I was wondering if anyone knew how to use indexing without having to inc addr all the time.

Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 21st Sep 2002 03:34
plz tell me if you read up on pointers and references in C++
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd Sep 2002 16:08
In C/C++ *(addr+x) is valid and works well (as you dont have to increase/decrease addr all the time).

DBPro (at the moment) wont accept that

Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 27th Sep 2002 08:58
=\ i bet you could make your own function dll and put it in the plugin folder but thats really overdoing it... =\ ill try to get something to work in dbpro
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Sep 2002 13:43
Yes, it does seem rather daft having to write your own pointer routine (which I already have done)...

Yes, I really am THAT good...
Puffy
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 28th Sep 2002 10:46
slide a copy of that file over this way (if you already have made it)... darthpuff@puffinteractive.com
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Sep 2002 15:33
You'll have to wait until Tuesday or so then - I'll have ADSL back at home..

Yes, I really am THAT good...
VietStylist
21
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Australia
Posted: 28th Sep 2002 17:23
Dbpro has pointers and references? Now this is going to really whoop arse! Don't know how to use them really anyway. Just know it can make a function return more that one value at a time.

Vs

Login to post a reply

Server time is: 2024-03-28 10:35:29
Your offset time is: 2024-03-28 10:35:29