JosueCom Posted August 12, 2018 Share Posted August 12, 2018 How do you use DATA and can you give me some examples? How do you fix the error when you include another bas file in your program when you are compiling it? Quote Link to comment Share on other sites More sharing options...
artrag Posted August 12, 2018 Share Posted August 12, 2018 Main: For i=0 to 9 Print at 0,<2> array(i) Wait Next Goto main Array: Data 1,2,3,4,5,6,7,8,9,10 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted August 12, 2018 Share Posted August 12, 2018 Main: For i=0 to 9 Print at 0,<2> array(i) Wait Next Goto main Array: Data 1,2,3,4,5,6,7,8,9,10 You can also use READ like old-school BASIC: Restore MyData For i = 0 to 9 Read A Print at 0, <2> A Wait Next MyData: DATA 1,2,3,4,5,6,7,8,9,10 "Restore" resets the pointer to a specific label, and "Read" retrieves the next value in the data list and moves the pointer forwards. 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted August 12, 2018 Share Posted August 12, 2018 How do you fix the error when you include another bas file in your program when you are compiling it? What do you mean? Including another ".bas" file should be fine with the "Include" directive. If there are any errors in your included files, the compiler will tell you in which one. Can you give more details of the problem? -dZ. Quote Link to comment Share on other sites More sharing options...
JosueCom Posted August 12, 2018 Author Share Posted August 12, 2018 What do you mean? Including another ".bas" file should be fine with the "Include" directive. If there are any errors in your included files, the compiler will tell you in which one. Can you give more details of the problem? -dZ. If I have a folder called music and I try to include "music\song1.bas", it will say "Error: INCLUDE not successful in line ...". Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 12, 2018 Share Posted August 12, 2018 What happens if you try the forward slash instead of the Microsoft-specific backslash? Quote Link to comment Share on other sites More sharing options...
JosueCom Posted August 12, 2018 Author Share Posted August 12, 2018 Thanks a lot. I have one more question: how do you use flash and can you give me some examples. Quote Link to comment Share on other sites More sharing options...
JosueCom Posted August 12, 2018 Author Share Posted August 12, 2018 (edited) What happens if you try the forward slash instead of the Microsoft-specific backslash? It still doesn't work. I also needed to include "lib" when I run "intybasic "Projects\Ultimate Race\snake_run.bas" "Projects\Ultimate Race\asm\snake_run.asm" "lib"" in order for contants.bas to work. Edited August 12, 2018 by JosueCom Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 12, 2018 Share Posted August 12, 2018 This is because the relative path is based in the IntyBASIC.exe location. Try to use a fully qualified path with backslashes. Quote Link to comment Share on other sites More sharing options...
JosueCom Posted August 12, 2018 Author Share Posted August 12, 2018 (edited) This is because the relative path is based in the IntyBASIC.exe location. Try to use a fully qualified path with backslashes. It worked thanks Edited August 12, 2018 by JosueCom 1 Quote Link to comment Share on other sites More sharing options...
JosueCom Posted August 12, 2018 Author Share Posted August 12, 2018 How do I use flash? Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted August 13, 2018 Share Posted August 13, 2018 This is because the relative path is based in the IntyBASIC.exe location. Try to use a fully qualified path with backslashes. Oscar, something to consider for a future revision: use the library directory in the input argument as the part of the "search path" for include files. -dZ. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.