Re: TIB: Question concerning renaming


[Prev][Next][Index][Thread]

Re: TIB: Question concerning renaming




What everyone here is talking about is the indirection operator "#".  This
simply means "Refer to the variable that is named in the following string
variable.

So, if I have two variables:
varA is set to "Yadda, yadda, yadda, kerpock, kerpock, kerpock"
varB is set to "varA"
then the following commands will have the following results:
:Disp varB
"varA"

:Disp varA
"Yadda, yadda, yadda, kerpock, kerpock, kerpock"

:Disp #varB
"Yadda, yadda, yadda, kerpock, kerpock, kerpock"

This essentially states, "Display the contents of the variable named in varB"

You can do anything you want to varA through varB now, such as:
:"Done"->#varB

now the results are:

:Disp varB
"varA"

:Disp varA
"Done"

:Disp #varB
"Done"

:CopyVar #"varB",#"MyVar"
Creates or overwrites variable MyVar, and put the contents of varA into it.

This is a VERY useful operator, almost the equivilant to pointers in C.

-Adam

CalenWakefield@aol.com wrote:
> 
> help!! On the 89 I want to save information in a game I am making to a
> variable that the operator chooses.  how do I go about doing this???
> for example:
> Dialog
> request "name of variable",name
> EndDialog
> 
> How would I use the information in name to name a new variable?
> please help!



Follow-Ups: References: