Zaaps1 Posted October 22, 2011 Share Posted October 22, 2011 Hey so I'm taking a programming class and for whatever reason he's teaching us BASIC. I was wondering if anyone could explain to me exactly how the RUN command works. So I have a OPEN "c:\qb64\vars.cfg" FOR INPUT AS #1INPUT #1, xINPUT #1, yINPUT #1, z[many more vars]CLOSE #1 code that I'm using to load a lot of variables I have saved elsewhere. I don't want this to make my main script huge, so I was thinking of using the RUN command to run it separately. Would all the variables be there and would be program treat them the same as when the code is directly in the script? Also is there a way I can use functions stored elsewhere or that is above BASIC ~It's Super Effective! (The Zaaps Blog)~My YouTube Channel, where you get to watch me go around and make a fool out of myself and all comp capersGuides:~Yeah I wrote them once~Suggestions:~Yeah I made those once~ Link to comment Share on other sites More sharing options...
Zaaps1 Posted October 22, 2011 Author Share Posted October 22, 2011 nvm, solved, new question ~It's Super Effective! (The Zaaps Blog)~My YouTube Channel, where you get to watch me go around and make a fool out of myself and all comp capersGuides:~Yeah I wrote them once~Suggestions:~Yeah I made those once~ Link to comment Share on other sites More sharing options...
obfuscator Posted October 22, 2011 Share Posted October 22, 2011 Odd. Looks okay to me. (not really knowing BASIC though) Can you verify that the right input is being accepted? EDIT: Oh okay. What was the solution? "It's not a rest for me, it's a rest for the weights." - Dom Mazzetti Link to comment Share on other sites More sharing options...
Zaaps1 Posted October 22, 2011 Author Share Posted October 22, 2011 I brought the OPEN...INPUT #1, ..CLOSE ... lines for each CASE outside of the SELECT CASE and it just worked. I still don't understand why it was broken in the first place, or why the solution solved it, but hey the more you know. ~It's Super Effective! (The Zaaps Blog)~My YouTube Channel, where you get to watch me go around and make a fool out of myself and all comp capersGuides:~Yeah I wrote them once~Suggestions:~Yeah I made those once~ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now