× 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.



Mike

I can only suggest using C or C++ instead, as you can test whether a pointer is null - no such test in CL. Maybe a wrapper in C that can replace null pointers with some special value that indicates to ignore this parameter, then call the CL.

Eh?
Vern

At 12:52 PM 9/10/2004, you wrote:
I have a command with many Return Variables. Most of the time that the command is used, only several of the return variable Parms will be supplied. For example, Sometimes it will be ParmA and ParmC and other times ParmB and ParmD, etc. with no particular pattern or frequency.
So the missing parms are passed to the CPP as Null Pointers (I think). The CPP, which is a CL Program, currently tries to stuff a value in all the Parameters that can be returned, whether they were passed or not. If the Parameter was not passed, this results in message MCH3601 "Pointer not set for location referenced". The Program monitors for this message after every assignment and the correct return values are passed back to the command. It works, but it's Ugly.


It's also slow. And I think that the fact that this message is being thrown and then trapped about 15-20 times is what's causing the Performance issue.... I'm sure it couldn't possibly be my code. ;)

My question is whether or not there's a more elegant way to do this within CL. Is there a way to Test the parameter before doing the assignment? Or any other little trick that anyone's aware of to prevent the error.

Thanks,

Mike



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.