🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8754

parsing functions in BASIC

#8754
From: Davis
Date: Fri, 07 Nov 1986 19:00
32 lines
1851 bytes
I have written a program in machine language (for the APPLE) that calls
the BASIC parsing and evaluation routines so that I am able to type
in a function through an INPUT statement and evaluate it as though
the function was entered as a DEF FN statement.  (There are some
important differences, see below).

I have a need for a similar feature for the IBM PC.  Such a program
would allow someone to enter a function through an INPUT statement
and have the BASIC program plot the function (for example).  The
advantage of this method over modifying the BASIC program to take
the function and insert it into the BASIC program appending a
DEF FN infront of it is that any change to a BASIC program erases
current values of the variables (at least in APPLESOFT).  This
is UNDESIRABLE for a plotting program since the graphing parameters
would need to be re-entered everytime the function was changed.

Please send any thoughts that you might have on how to do this
to me via E-Mail (since I rarely read this group).
The answer does not need to be executable in BASIC but
a BASIC solution is desirable for ease of porting.  ( I hear
that Turbo-Pascal has/sells a function evaluation package.)

If there is sufficient interest if how to do this then I will
post solutions to the net.

			Thanks
			Mike Davis
			ihnp4!ihuxy!jmdavis
			
			
			
Technical Details
Message-ID: <1669@ihuxy.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!ihuxy!jmdavis

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!ihuxy!jmdavis
From: jmdavis@ihuxy.UUCP (Davis)
Newsgroups: net.micro.pc
Subject: parsing functions in BASIC
Message-ID: <1669@ihuxy.UUCP>
Date: Fri, 7-Nov-86 14:00:52 EST
Article-I.D.: ihuxy.1669
Posted: Fri Nov  7 14:00:52 1986
Date-Received: Sat, 8-Nov-86 06:45:42 EST
Distribution: net
Organization: AT&T Bell Labs, Naperville, IL
Lines: 32
Keywords: How do I do this?