Convert string to expression

Posted by dluoto on 28-Oct-2011 12:15

I am a novice to Progress and am not a programmer but I do support an application where I create small pieces of code to get things done within the application.  I think the simplest way to describe what I need to know how to do is how do I take a string of input and convert it to an expression that can be processed/evaluated by my program.  To be more specific, I have users that will create concatentation formulas and store them in a .csv table.  There are hundreds of formulas that they must maintain.  i.e   'V' + '-' + ATT1 + '-' + ATT2 + '-Vane Separator'.   ATT1 and ATT2 are input characters that the user picks from a combobox.  Depending on the  key to the .csv table I lookup the formula and bring it into my program and now need to process that formula and output the results to an Editor box.

I generally use the Open Edge Development ABL Reference guide to study the various functions, statements, etc. but I cannot seem to find anything that will convert text to expression. Sorry if I am not using the correct terminology but this is the best I can describe it.  Is this some kind of DEFINE VARIABLE that does this?  I know the simple things like STRING, DECIMAL, etc. but what function converts text to code?

Thanks

Don

All Replies

Posted by Peter Judge on 28-Oct-2011 12:22

If you're asking how to return a set of data based on a fluctuating query clause, take a look at the QUERY object, especially its dynamic variant. (which I think you're not).

Alternatively, look at "Natural Language" (http://www.oehive.org/amduus/NaturalLanguage/) and EQN (http://www.oehive.org/node/1006) from http://www.oehive.org/taxonomy/term/142?page=1 .

-- peter

Posted by Thomas Mercer-Hursh on 28-Oct-2011 12:26

Is this what you are looking for?

http://www.oehive.org/node/1006

http://www.oehive.org/node/1888

This thread is closed