Path: utzoo!utgpu!watmath!att!cuuxb!mmengel From: mmengel@cuuxb.ATT.COM (Marc W. Mengel) Newsgroups: comp.lang.c Subject: Re: Reading in Functions Message-ID: <4261@cuuxb.ATT.COM> Date: 19 Oct 89 16:08:48 GMT References: <1197@utkcs2.cs.utk.edu> Reply-To: mmengel@cuuxb.UUCP (Marc W. Mengel) Organization: AT&T-DSD, System Engineering for Resellers, Lisle IL Lines: 19 In article <1197@utkcs2.cs.utk.edu> wozniak@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@cuuxb.att.com attmail!mmengel ...!{lll-crg|att}!cuuxb!mmengel