Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!aries!mcdonald From: mcdonald@aries.uiuc.edu (Doug McDonald) Newsgroups: comp.lang.c Subject: Re: Reading in Functions Message-ID: <1989Oct18.202238.22792@ux1.cso.uiuc.edu> Date: 18 Oct 89 20:22:38 GMT References: <1197@utkcs2.cs.utk.edu> Sender: news@ux1.cso.uiuc.edu (News) Reply-To: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Organization: ^ Lines: 17 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. > > >-bryon- Well, you read the formula into a char array and then either interpret or compile it to get a y value at each x point. There is a program called "gnuplot" that does this, and the graphing too. I have written a formula compiler for the 8086 and use that. I also have an interpreter (only) that I could send you. Doug McDonald (mcdonald@uxe.cso.uiuc.edu)