Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ogicse!ucsd!ucrmath!koufax!rhyde From: rhyde@koufax.ucr.edu (randy hyde) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: Programming Question Message-ID: <15434@ucrmath.ucr.edu> Date: 21 Jun 91 21:09:58 GMT References: <142295@unix.cis.pitt.edu> Sender: news@ucrmath.ucr.edu Reply-To: rhyde@koufax.ucr.edu (randy hyde) Distribution: usa Lines: 8 Several languages, generally interpreters, provide an "execute" statement. You supply a string which contains a valid statement and it parses and executes that statement. Some older versions of BASIC do this. SNOBOL4 does this. LISP does this. Etc. Forget Pascal and C. I don't know of any interpreters for these languages that allow this. Of course, you could always write your own expression evaluator (you could use FLEX & BISON to generate the code for you) and link this into your program. *** Randy Hyde