It's posssible with VB but i don't know hos to do in purebasicHere is what i want to do
toto.s="variable1"
variable1= 100 assigning the value of variable1 to 100 , the var variable1 is given by toto
debug variable1 --> result 100
THanks in advance

It's posssible with VB but i don't know hos to do in purebasicHere is what i want to do
toto.s="variable1"
variable1= 100 assigning the value of variable1 to 100 , the var variable1 is given by toto
debug variable1 --> result 100
Code: Select all
toto.s = "variable1"
Define variable1
Runtime variable1
SetRuntimeInteger(toto, 100)
Debug variable1
breeze4me wrote: Thu Mar 14, 2024 10:25 am I think you mean something like this.
However, PB is not an interpreter language like VB, so variables that will be used must be defined in advance, such as "Define".
Alternatively, you can use a map variable.
Code: Select all
toto.s = "variable1" Define variable1 Runtime variable1 SetRuntimeInteger(toto, 100) Debug variable1