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



Joe,

While I agree with your statements, it does point out -why- one should
use flags instead of relying on indicators or BIFs in their mainline
code.

I know it probably doesn't help you any now that you are into your
project, but our shop standard is to have the CHaIN, SETLL, READ code in
separate /COPY members which will return flags: xxxHIT, xxxDONE and
xxxANY.

This way the mainline code can test the xxxHIT on a CHAIN or READ, or
xxxANY on a primed loop, etc. and the /COPY member can use indicators
for clients on older systems or BIFs on newer versions.  In either case
the program logic stays the same and doesn't break.

This also gave programmers a little flexibility in "style" that, IMO, is
easier to read than the BIFs

For example:

                EXSR    xxxxGET
        xxxxHIT DOWEQ   'Y'
                .....
                EXSR    xxxxREAD
                ENDDO

-or-

                EXSR    xxxxSET
                EXSR    xxxxREAD
        xxxxHIT DOWEQ   'Y'
                .....
                EXSR    xxxxREAD
                ENDDO

-or-

                EXSR    xxxxSET
                EXSR    xxxxREAD
        xxxxDONEDOUEQ   'Y'
                .....
                EXSR    xxxxREAD
                ENDDO

-or-

                EXSR    xxxxSET
        xxxxANY IFEQ    'Y'
                EXSR    xxxxREAD
                .....
        xxxxHIT DOWEQ   'Y'
                .....
                EXSR    xxxxREAD
                ENDDO
                ENDIF



BTW, we are moving at glacial speed in moving stuff to procedures also
<G>, but when we do, our mainline code still won't change, just the
contents of the /COPY.

Joe Pluta wrote:
>
<<snip>>
> The loss of functionality is not purely the issue of the BIF, Doug.  It's
> the fact that, before the BIFs were available, I would write an I/O opcode,
> set a breakpoint immediately after the opcode, and be able to immediately
> determine the results of the operation without having to step through other
> code.  With the new coding style, I am told to stop using indicators, and
> use BIFs instead, but now I can no longer execute that same procedure.
<<snip>>


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.