Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!ncar!unmvax!uokmax!d.cs.okstate.edu!drd!mike From: mike@drd.com (Mike Rovak) Newsgroups: comp.lang.pascal Subject: Re: (none) Summary: Piece of cake Keywords: parse algebraic expression Message-ID: <1991Apr12.123137.8905@drd.com> Date: 12 Apr 91 12:31:37 GMT References: <26538@adm.brl.mil> Sender: Mike Rovak Organization: DRD Corporation Lines: 42 In article <26538@adm.brl.mil> AL282247%VMTECSLP.BITNET@uga.cc.uga.edu ( J Picazzo) writes: >Hi, > You asked about processing an equation in run-time. Well, PASCAL is a >compiler, so once you've compiled a program, you can't change the code. > What you can do is implementing a routine that analizes the equation using >stacks or binary trees (it's a hard one, the equation must be given in a >string, and analyzed part by part). > I remember I've done something like that once, but I couldn't find it. If I >find some routines that work, I'll send them to you. Good luck. > > J Picazzo > ITESM Campus San Luis - MEXICO I have in my hand the Turbo Pascal 3.0 source code to a complete working program which uses an ASCII file data dictionary (which can be extended) and an arbitrary algebraic expression supplied by the user from the terminal to convert the expression to postfix form and plot the equation using specified ranges. I did not write this code, I got from "SOMEWHERE" so I would recommend that you do not use it commercially since the copyright is not ours. I do recall that it may be used freely for personal use. I'm sure that you could easily use these routines and make them do whatever you want. However, I have it here only in hardcopy, I have it at home on disk "SOMEWHERE." How do you want it? If you want it email, send me a good email address, and I'll tear the house up looking for that disk, which may take a few days. If you can't wait, I CAN FAX it to you, send me your FAX number, or I can snail it to you. -- Mike ------------------------------------------------------------------------ Disclaimer: My opinions do not necessarily reflect those of my employer. ======================================================================== "Abraham believed God, and it was accounted to him for righteousness." ------------------------------------------------------------------------ mike@DRD.Com uunet!apctrc!drd!mike ========================================================================