B
bu-bu
Guest
Hello All,
I don't know how to create a symbol and use it later in the left side
of assignement.
I would like to create a symbol, let say strcat("My_" Var)
(with Var = "Symbol")
Then convert it into a symbol (using stringToSymbol function)
and then, using this Symbol in left side of assignement : My_Symbol =
result_of_my_function
I really need My_Symbol to be unrepeatable. My_Symbol will be
generated in a procedure that will be called many times: I need to
sort my data!
I tried stringToSymbol(strcat("My_" Var)) = result_of_my_function but
i got error message:
*WARNING* (Parser): illegal left hand side of assignment operator
how can i do that ? I tried with sprintf, println, and so on, but
resultless.
thanks a lot for your help.
Best,
bubu
I don't know how to create a symbol and use it later in the left side
of assignement.
I would like to create a symbol, let say strcat("My_" Var)
(with Var = "Symbol")
Then convert it into a symbol (using stringToSymbol function)
and then, using this Symbol in left side of assignement : My_Symbol =
result_of_my_function
I really need My_Symbol to be unrepeatable. My_Symbol will be
generated in a procedure that will be called many times: I need to
sort my data!
I tried stringToSymbol(strcat("My_" Var)) = result_of_my_function but
i got error message:
*WARNING* (Parser): illegal left hand side of assignment operator
how can i do that ? I tried with sprintf, println, and so on, but
resultless.
thanks a lot for your help.
Best,
bubu