On Sun, 2010-09-12 at 23:18 +1200, Ralph Versteegen wrote: > VB6 calls it "AddressOf" instead of @ or &???
Absolutely. Also if you pass around a memory address (i.e. have an argument to a function be a ByVal Long), there's no way to dereference the pointer in VB6. So the memory address gets pushed to the stack, and the function can't do anything but pass the address to a C/C++ function that can dereference the pointer. Which is why ByRef makes things a lot easier. > At first I thought C++ references and BYREF arguments were identical, > however there's a difference. You can't pass a primitive data type > temporary variable (such as a constant, eg. just passing '3') as a > reference argument in C++, while you can in FB. In both languages, you > can pass temporary structures by reference. I have a feeling that this should be illegal in FB. I could totally see FB forgetting that it stored a variable in its nondeclared variable storage and overwriting it in a later function. _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
