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



Hi Don,

Scott, your code was very similar but what I was trying to do was
pass the name of the field and not the actual data in the field ( not
filerec.PLCD but 'filerec.PLCD'

Sorry, your code does NOT pass the name of the field. If you think it does, then you don't even understand what your code does.

What it does is pass the ADDRESS of the field. That's what the %addr() is for, it passes the address of the field. How the heck did you write your code at all if you didn't understand this?

The reason your code works is because the address of the field is within the space in memory occupied by the filerec data structure. So when data is read into filerec, your pointer points to the particular field within the data structure. It has nothing to do with the name of the field, it has to do with it's address -- that is, where it's stored in memory.

Under the covers, in the internals of the machine, my code will look identical to yours. The difference, at the human-level, is that I'm passing a subfield of the data structure directly, whereas you're passing a pointer to a subfield of the data structure, and then dereferencing them. ultimately, we both end up with a 50A field that's in the same area of memory as your file subfield, so they do exactly the same thing.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.