Title: Re: create variable on user request
Post by: SMcNeill on June 02, 2020, 12:18:45 pm
You'd need to DIM an array to get the user variable name and then compare the user input verses that array for matches.
DIM UserVar(2) AS STRING
FOR I = 0 TO 2 INPUT "Enter a variable name=>"; UserVar(1) NEXT
DO 'Let user input whatever they want 'Parse what they want and compare their variable names to those stored in the array 'Display results LOOP 'Until the user is finished
So at start the user can enter X, Y, Z for three variable names. Then the user can do things like X = 3. Y = 5. Z = X + Y... as long as you parse and code to allow the user such actions in your program.
** Fellippe beat me to it. I type too slow on my iPad. :'( I want my new PC already!
Title: Re: create variable on user request
Post by: RhoSigma on June 02, 2020, 02:02:37 pm
An alternative is my tag string API as I use in my GuiTools Framework. The API consists of the TagSupport.bi/.bm files in the folder dev_framework\support. The API is not GuiTools specific and can be used as is in any application. Documentation is in docs\GuiToolsFramework.pdf or the include files itself.