Morning George, I wrote an expression evaluator once, many years ago, in SuperBasic and then converted it to C. Yeuch - all that recursion.
I suspect the obvious answer to how the EE should be written is 'so that it conforms to arithmetic priority' as in brackets, multiplication/division addition/subtraction etc. There was an ancronym thingy we used to use at school, but that was many many years ago and I'm losing my mind, so I can't remember. An expression is, if I remember correctly : ( expression ) term * term term / term factor + factor factor - factor number and a term or factor can be signed, and are, in them selves just another form of expression - now you see where the recursion comes in ! If you need/want my sources than I can dig them out for you - just let me know. Cheers, Norman. ------------------------------------- Norman Dunbar Database/Unix administrator Lynx Financial Systems Ltd. mailto:[EMAIL PROTECTED] Tel: 0113 289 6265 Fax: 0113 289 3146 URL: http://www.Lynx-FS.com ------------------------------------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 8:09 AM To: [EMAIL PROTECTED] Subject: Re: [ql-users] Assembly question In a message dated 26/01/03 17:09:33 GMT Standard Time, [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: <SNIP> If anyone wants this I would appreciate a definition of how the expressions should be evaluated. An updated GWASS would, of course, have to have a new option to use its current method of evaluation or to use the different method. I await comments with ba(i)ted breath. George This email is intended only for the use of the addressees named above and may be confidential or legally privileged. If you are not an addressee you must not read it and must not use any information contained in it, nor copy it, nor inform any person other than Lynx Financial Systems or the addressees of its existence or contents. If you have received this email and are not a named addressee, please delete it and notify the Lynx Financial Systems IT Department on 0113 2892990.
