You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Thanks Lance,
I knew you had answered this question before.
The bug actually went away after I rebooted. I beat my head against the wall for 4 hours and then said the heck with it and rebooted...
(Well I didnt' literally beat my head against the wall
Yup, BYCOPY seems quite reasonable, provided the target sub/function is expecting a BYREF dynamic string.
For all intents and purposes (with this type of usage), there is little difference between BYVAL/BYCOPY unless the target sub/function is expecting the string BYVAL, in which case, BYCOPY will not be the best choice.
I probably know the answer to this but lets see what others think.
I have a global variable g_hdEncryptionKey lets say...
It contaisn a HEX EQUIVELANT of a binary key used for en cryption, so lets say that key looked like this:
g_hdEncryptionKey = "A1B2C3D4E5F6A1B2C3D4E5F6"
Now, I want to keep this global variable just the way it is and then allow each function to call yet another function which will then modify the key for it's purpose.
I don't want it modifying the Global key however because other functions need it just like it is.
What's the "BEST" way to do this?
It's only 16 bytes long basically, would this be ByVal or ByCopy? I want to pass a COPY of the key basically...
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: