? Get the value of a variable from its name (Page 2) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Get the value of a variable from its name

1 2
  • #21 ✎ 122 raimondz First Week Joined in the very first week of SmileBASIC Source Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    I thought you could PRGINS it, and run it though. I think that's why I had run it and I checked if the variable exists and it returned false.
    You can't do that either. PRGINS insert a line on other program but it doesn't run that command. You need to insert the line and run (Using EXEC) that page. The side effect of doing that is that every variable on that page will be reset since they are bound to the page were they're created. AS 12Me21 said, you should use arrays to "create" variables. PS: I believe that Lowerdash and N# use that method to handle object. I haven't used N# but lowerdash doesn't let you use arrays on objects members. The source code of the latter is a bit confusing but it's caused by the lex generator used to extend the syntax of smilebasic.
    Posted
  • #22 ✎ 54 dfrost2 Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself What If I make a global variable? Posted
  • #23 ✎ 54 dfrost2 Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself like VAR VARIABLE% Posted Edited by dfrost2
  • #24 ✎ 54 dfrost2 Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself How about I copy the code(the illegal code compiled) in slot 1, then output it in slot 2, then run it from there? ( look like a noob don't I?) Posted
  • #25 ✎ 876 snail_ Helper Received for being very helpful around SmileBASIC Source Achievements First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Request to admins to rename this thread to something more appropriate? Posted
1 2