Original Post
Hello, I have a question regarding AS. My goal is to retrieve all of the user variables from a script and display them in a treeview in my host application. I believe the extraction of the variables is going to be rather easy because of as's rich api, but I do have a programming question that perhaps someone here could assist me with. With an stl map it is possible to map a key with a value, such as mymap["MyVar: "] = MyVar; So I will know the data type of the script variable as a string, and I will be able to have simple maps of all of the basic types. How will i indirect a variable to the correct type so that its display is correct only know by string what data type it is? Would i use a macro, and 2 maps, one for the varname (eg "MyVar")and a void * (eg &MyVar), and the other with the varname (eg "MyVar") and the data type (eg "double") and then use a macro to cast the void* ? And if the macro would be best, what is the syntax exactly to make a string literal into not a string?