Announcement

Collapse
No announcement yet.

String to Variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kingzooly
    replied
    I think you getting them confused a little if you did a5b = 18; then called it it will work fine, if you need to build the varibles up then use a table

    a = {
    {},{},{},{},{b=18}
    }

    then you can do a check for the i value, in your case 5

    a[5].b

    img http://icecream.me/uploads/f31223436...dd17ca9712.png

    Attached Files

    Leave a comment:


  • javisuesk
    started a topic String to Variable

    String to Variable

    Hello everyone and Happy New Year!!

    Is it possible to convert a string into a "variable".
    I would explain it better with a simple example.

    --example
    a5b=18;
    i=5;

    --concatenation
    c="a"..i.."b";
    Dialog.Message("result", c, MB_OKCANCEL, MB_ICONEXCLAMATION, MB_DEFBUTTON1);


    In this example, the result Message is "a5b", but I want it to consider as "variable" so it shows 18.

    Anyone knows how to solve this?

    Thanks in advance!!
Working...
X