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 / Pass by Reference in DBpro

Author
Message
Bulleyes
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 13th Dec 2002 05:50
Does DBpro support function parameters that are passed by reference? For example in VB, you will do something like:

Function Test(ByRef Param1 as String, ByRef Param2 as String)

Both param1 and param2 will be treated as reference variable. That it if you modified the parameters in the function body, the changes will affect the variable that the function caller passed in.

This is great for function that wish to return more that one value. I often used it in my C++ programs. Can DBpro does that?
Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
G Man X
22
Years of Service
User Offline
Joined: 11th Dec 2002
Location:
Posted: 13th Dec 2002 19:37
Mmm. I'd like to know too. Also, what about straight pointers?
My favouritest compiling BASIC (HiSoft for ST)had string and variable pointers available to the programmer. Handy!

Good The Boyz Have Done It Is!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 13th Dec 2002 19:39
There are pointers... if you want anything complicated you can use my plug-ins.

However, you can't pass the address of variables to functions unfortunately.

Good news everybody! I really am THAT good...

Login to post a reply

Server time is: 2025-05-14 19:22:56
Your offset time is: 2025-05-14 19:22:56