Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use variables whose names can be created at run time
#1
I am aware of "__VarVar" :

download/file.php?id=454

My question :

In a macro a series of str variables with names in the form "en", where n integer values, are created (ie. e01, e02 etc.). I wonder whether I could store values in these variables using a for loop, for example :

Quote:for int'i 0 20
e??=F"Val{i}"

Many thanks in advance, for any advice.
#2
Variable names cannot be created at run time. Why not to use array for it?
#3
Thank you ! Yes, the proper solution might be to use an array, and I usually make use of it. However, in the case that a smart dialog procedure auto-generates string control variables (ie. e12, e13, e14 ...) you have to store in these variables in a "per-se" (one-by one) basis. That is why I was thinking of generating variables names at run time. Anyway, I by-passed this issue in another way.

Best regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)