🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.misc
Article #6

Re: Writing an expression evaluator

#6
From: Samuel McGrath
Date: Thu, 22 Feb 1996 09:37
17 lines
1150 bytes
No no no, you're doing this all wrong!  The correct way to write an 
expression evaluator is with QBASIC.  Observe:

    PRINT "Enter an expression:"
    INPUT E$
    OPEN "TEMP.BAS" FOR OUTPUT AS #1
    PRINT #1, "PRINT " + E$
    PRINT #1, "RUN "+CHR$(34)+"THISPROG.BAS"+CHR$(34)
    CLOSE #1
    RUN "TEMP.BAS"

Jeez guys, I don't know why your complicating the issue with things like 
parsing and recursion.  Go figure.
 
-Sam McGrath

[insert smiley face here.  I refuse to.]
Technical Details
Message-ID: <4ghdft$24t@crl9.crl.com>
Path: arc1-ca.pugleaf.net!crl9.crl.com!not-for-mail
References: <311FEBD8.7305@cnj.digex.net> <sundial.2346.02382731@primenet.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!crl9.crl.com!not-for-mail
From: sammy@crl.com (Samuel McGrath)
Newsgroups: comp.lang.pascal.misc,comp.lang.pascal.borland,comp.programming,comp.lang.misc,comp.lang.c,comp.lang.c++
Subject: Re: Writing an expression evaluator
Followup-To: comp.lang.pascal.misc,comp.lang.pascal.borland,comp.programming,comp.lang.misc,comp.lang.c,comp.lang.c++
Date: 22 Feb 1996 01:37:01 -0800
Organization: CRL Dialup Internet Access (415) 705-6060  [Login: guest]
Message-ID: <4ghdft$24t@crl9.crl.com>
References: <311FEBD8.7305@cnj.digex.net> <sundial.2346.02382731@primenet.com>
NNTP-Posting-Host: crl9.crl.com
X-Newsreader: TIN [version 1.2 PL2]