Re: 4GL Question (Either really easy or impossible, you decide) ;*)
Posted in 1999
I'm missing something here, but I am keen to understand what you are aiming for. As far as I can see, the local variable names in a function have nothing to do with how reusable it is. Its usually the SQL statement that needs to be passed along with data values that control how the function behaves. If you want to elaborate on what you are trying to achieve, I would definitely be interested in exploring your idea further. Rudy On Tue, 24 Aug 1999 18:00:48 GMT, "David Murray" <pcmis1@localnet.com> wrote: >I'd like to be to make a 4GL function I'm creating be as reusable as >possible. In order to do this I'd like to make any 'LET' statements in >the function generic by allowing the left operand to be a variable. Is this >possible? > >I'D LIKE > >LET gr_product.code = variableX -- Traditional >way of assigning a value to variable > >TO BECOME > >LET variableY = 'code' -- What >I''m trying to do. >LET gr_product.variableY = variableX > >LET variableZ = "LET gr_product.code = 123456" -- OR this maybe > >EXECUTE variableZ > >Basically, I'd like to construct a 4GL statement in a text variable and >then have 4GL execute the contents of the variable. (Similiar to the >execution of prepared SQL). I know I can get around this by utilizing a >'bunch' of IF logic, but I'd prefer to keep the function as generic and >neat as possible. > >Please share the knowledge. THANKS! >David J. Murray >IS Project Leader >Schenectady, NY