[Fwd: Evaluating a mathematical expression .. Possible MLS issues...]

From: Uday Moogala <udaymoogala_at_yahoo.com>
Date: Wed, 19 Jun 2002 18:08:41 -0400
Message-ID: <3D1100E9.5906685_at_yahoo.com>




 

Mahesh Chandak wrote:

Hi,     I am trying to implement expression data type.. What it means is a user can type any expression like ( a + b - c) * 8I have to parse this expression to make sure it is mathematically correct. Finally the expression would be evaulated bysubstituting values for a , b and c.    In my case, I have a test form where there is a test code(aphanumeric) and test type which can be numeric range,textor can be an expression. For expression data type, the system is able to use the results of other Numeric Range tests and apply a mathematical expression to derive a calculated result.The following example illustrates the use of Expression test types: Mass and Volume are defined as separate tests, where the corresponding measurement are recorded as results.To derive Density, another test with an Expression test type is defined as Density = Mass / Volume.User also needs some functions like exponent,squareroot , power etc which can be used in the expression. I can set some rule in order to use the above functions in the expression :For exponent, user has to use EXP(A) where a is the test codeFor power, user has to use POWER(A) where a is the test code So user can type an expression as A + POWER(B) * 7My question is can a user in some other non-english environment (Japanese,Chinese,French etc..) type an english word like POWER ..  My parser while evaluating the expression will look for functions like "POWER" , "EXP" etc..     Has anyone implemented this using FORMS AND PL/SQL ?? Thanks and Regards,Mahesh.    
Received on Thu Jun 20 2002 - 00:08:41 CEST

Original text of this message