Reading in Functions
Marc W. Mengel
mmengel at cuuxb.ATT.COM
Fri Oct 20 02:08:48 AEST 1989
In article <1197 at utkcs2.cs.utk.edu> wozniak at utkux1.utk.edu (Bryon Lape) writes:
>
> How does one write a procedure in C so that the user can type in
>a formula from the keyboard and the programme will graph it? I can
>handle the graphing part, but what I want to be able to do is is have a
>programme that will read in a function and graph the result.
The only neat, clean, portable way to do this is to write a
string expression parser, and interpret the function string
for each point on the graph. The parser can be pretty
simple; just a recursive descent type deal.
>-bryon-
--
Marc Mengel mmengel at cuuxb.att.com
attmail!mmengel
...!{lll-crg|att}!cuuxb!mmengel
More information about the Comp.lang.c
mailing list