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


  • Subject: Re: Hooking display file I/O
  • From: "Leif Svalgaard" <leif@xxxxxxxx>
  • Date: Mon, 6 Aug 2001 07:39:53 -0500

From: DennisLovelady <dennis@lovelady.com>
> From: "Steve Richter" <srichter@AutoCoder.com>
> > I respect your technical knowledge and appreciate the work that you do
> > very much, but your coding style ... 
> Actually, I find Leif's example a tad easier to work with, if only because
> of the first-person vs. second-person thing.  Just who *IS* the "you" in
> YourSeptContents?  MySept or MY-SEPT or whatever makes SO MUCH MORE sense.
> Or is it just me?

carful naming of operands and liberal use of labels go a long way of making
the code easier to read without the need for elaborate comments, e.g.:

WHILE-STACK-NOT-EMPTY:
    CMPNV(B)     STACK-TOP, 0/EQ(DONE-POSTFIX);
    ADDN(S)      CUR-TOKEN, 1;
    CMPNV(B)     CUR-TOKEN, TOKEN-NBR/HI(DONE-POSTFIX);
    CPYBLA       SINGLE-TOKEN, TOKEN(CUR-TOKEN);

CHECK-IF-OPERAND:
    CMPNV(B)     TOKEN-TYPE, IDENTIFIER-TYPE/LO(CHECK-IF-LEFT-PAR);
    CALLI        STORE-POSTFIX-OPERAND, *, .STORE-POSTFIX-OPERAND;
    B            WHILE-STACK-NOT-EMPTY;

CHECK-IF-LEFT-PAR:
    CMPBLA(B)    TOKEN-TEXT, "("/NEQ(CHECK-IF-OPERATOR);

STACK-IT:
    ADDN(S)      STACK-TOP, 1;
    CPYBLA       STACK(STACK-TOP), SINGLE-TOKEN;
    B            WHILE-STACK-NOT-EMPTY;

CHECK-IF-OPERATOR:
    CMPNV(B)     TOKEN-TYPE, OPERATOR-TYPE/NEQ(CHECK-IF-RIGHT-PAR);

UNSTACK-PRECEDENCE-OPERATORS:
    CMPNV(B)     STACK-TYPE(STACK-TOP), OPERATOR-TYPE/NEQ(STACK-IT);
...




+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

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.