Passing variable value to other variable
Passing variable value to other variable
(OP)
First I'm sorry for my bad english
Is there a way to pass value from one variable or field to other variable, like
VAR1='This is a string'
VAR2=99
Entry local variable UNOS STRING(10)
When I enter a value 'VAR1' in UNOS
Message(%UNOS) need to say 'This is a string'
Otherwise entering 'VAR2'
Message(%UNOS) need to say 99
Or something like that
regards,
Is there a way to pass value from one variable or field to other variable, like
VAR1='This is a string'
VAR2=99
Entry local variable UNOS STRING(10)
When I enter a value 'VAR1' in UNOS
Message(%UNOS) need to say 'This is a string'
Otherwise entering 'VAR2'
Message(%UNOS) need to say 99
Or something like that
regards,
RE: Passing variable value to other variable
CODE
!enter value 'VAR1' in UNOS
UNOS = 'var1'
BIND('var1',var1)
message(evaluate(UNOS))
Regards
RE: Passing variable value to other variable
I'm not sure I explained the problem well:
I have something like
BAZ: Value1 = 123
BAZ: value2 = 456
BAZ: Value3 = 789
At second base will keep the field name
DDT: val1 = 'BAZ: Value1'
DDT: val2 = 'BAZ: Value2'
DDT: Val3 = 'BAZ: Value3'
Is there a way to tell if
ISM# = DDT: val1
I get the value
ISM#=123
(DDT:val1 = BAZ:Value1 = 123)
PS.Since I have previously worked in the Clipper to be there, it looked like this
ISM# = &DDT:val1
regards,
RE: Passing variable value to other variable
Hope you got my point.
Regards
RE: Passing variable value to other variable
CODE
DDT:val1 = 'BAZ:Value1'
BIND('BAZ:Value1',BAZ:Value1)
ISM# = evaluate(DDT: val1)
p.s : remove the spaces after : in your variables
Regards