Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Passing variable value to other variable

Passing variable value to other variable

Passing variable value to other variable

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'

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


RE: Passing variable value to other variable

Simply you can do this


VAR1='This is a string'
!enter value 'VAR1' in UNOS
UNOS = 'var1'


RE: Passing variable value to other variable

Thanks for your reply

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  


(DDT:val1 = BAZ:Value1 = 123)

PS.Since I have previously worked in the Clipper to be there, it looked like this
ISM# = &DDT:val1


RE: Passing variable value to other variable

Thats what I said , but you have to bind the BAZ:Value1.. etc before using evaluate function. It is exactly like clipper's &.

Hope you got my point.


RE: Passing variable value to other variable

In your example


BAZ:Value1 = 123
DDT:val1 = 'BAZ:Value1'


ISM# = evaluate(DDT: val1)

p.s : remove the spaces after : in your variables



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close