×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hello,
The code works fine. What I don't understand is why ForceRead has a
value. When I run in debug I would expect the evaluation of the
ForceRead parameter to not be addressable because it wasn't passed.
You are using an area of the computer's memory that you weren't meant to
use. The value of that area of memory is undefined. It might contain a
valid pointer, but it might not...
In your example, when you previously called it with the ForceRead set to
'1', it put a pointer in that spot in memory that points to a value of
'1'. By some stroke of luck, nothing else has re-used that area of
memory, so you end up getting the '1'.
If "something else" reuses the area of memory, then that routine might
by chance store a pointer there. In that case, you might get a
"garbage" value (actually, just a value that doesn't make sense in context.)
If "something else" reuses the memory for a non-pointer, then you'd end
up with the pointer error you're expecting.
Ultimately, reading that area of memory without first checking %PARMS to
make sure it belongs to you is NOT valid. You MUST check %PARMS before
using it (which you are doing in your code, just not when you evaluate
the variable in the debugger.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.