Change value of a variable using its name with Runtime feature

Started by Israel Vega, May 30, 2015, 03:23:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Israel Vega

Is possible change value of a variable in PureBasic...a long time ago I suggested to PowerBasic a feature like this...

Define A$
Runtime A$
MessageRequester("VALOR DE A$ :",GetRuntimeString("A$"),0)
SetRuntimeString("A$", "VEGA")
MessageRequester("NUEVO VALOR DE A$ :",GetRuntimeString("A$"),0)

Bob Houle

Yes Israel... works as you say... with variables, constants and procedures.

These objects can be manipulated using their string reference, even when the program is compiled.

This feature allows things like adding a small realtime scripting language to the program, allowing easy modification of exposed variables, using runtime constants values.