What you probably mean is that you've created a string, e.g. "variable3", and you want to turn that into a global variable that can hold the scalar value, e.g. variable3 = 3 (or anything else)? This you can do like this:
call compile format ["%1 = 3", "YourString"];
That will basically translate into
YourString = 3;
I only use this method however when I need to, for instance, dynamically create global variables that can be saved from mission to mission in a campaign. For everyday use, you really don't -need- to create new global variables every other minute, usually there's a perfectly good way around it. What exactly do you need this thing for, how does the script look etc? Give us some more info and we might be able to give you an alternative way of figuring stuff out
Wolfrug out.