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

<snip>
> I know in writing a standard program I could pass parms defined as arrays,
> but I think that this could be done using pointers. I have used limited
> pointer logic with existing subprocs.
</snip>

I don't really see any advantage of doing this task with pointers. 
You might use a user space to store the data, but that wouldn't speed
anything up versus arrays, in fact it will probably slow things down.

I suppose you could allocate a chunk of memory, point a variable at a
pointer, and walk the variable through the chunk of memory,
getting/putting the elements of the 'array', but again, this wouldn't
really speed things up, and it's basically what an array does for you.

The only things I have used pointers for in this way was when I had a
few hundred thousand records in a file, and I had to find out which
ones were 'duplicates' (a few fields had to be the same to be
considered 'duplicates'), which involved 100,000^3 read/compare
operations.  I read all records into a user space, and walked a DS
through the user space to speed up the operation.  It worked, but in
the end, somebody on this list came up with a clever LF/chain
scenario, and this was the fastest.

Other than that, if you have a long text field, and you want to show
it on a report or on the screen, and wrap it at different sizes, you
can use pointers.  I have done this, but only to avoid a calculated
number of IF/%SUBST operations.  An overlaid array would have probably
worked just as good, but using pointers is way cooler.


-- 
"Enter any 11-digit prime number to continue..."

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.