Weekly Qbasic and Qb64 Lesson Topics
March 29, 2024, 01:03:27 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

How to convert multiple RUN linked Bas files?

Pages: [1]
  Print  
Author Topic: How to convert multiple RUN linked Bas files?  (Read 759 times)
Chrysippo
Newbie
*
Posts: 2


« on: August 06, 2011, 10:40:45 am »

Each attempt to run a QuickBasic program stalls at the first attempt to RUN another basic file (error 53 - File not found). No problem earlier in code, apparently, finding a file using OPEN. I have tried full path, checking case, all to no avail. My program consists of many basic files RUN from a menu in another basic file which works perfectly in Qbasic. I have kept same directory structure for QB64 as my Qbasic one, duplicating directories and files where necessary so that code should not require changing.
Is it the case that in converting and attempting to run my opening basic file QB64 is tripping over an unconverted basic file being called with RUN? How then best to convert all the basic files - there are rather a lot of them!
QB64 seems marvellous, and would be useful on my W7 notebook.
Cheers

Following is code for opening section of first bas file in chain with offending RUN at line -5.
Code:
DECLARE SUB Stickman (man$)

REM Opening screen for Sequence Lists
CLEAR , , 10000

m% = -1

FOR C% = 1 TO 9
    READ C$(C%)                        ' Letters of title - SEQUENCE
NEXT C%

OPEN "Progress.cfg" FOR INPUT AS #1
INPUT #1, switchS%, TitleS%, note%, runN%
CLOSE #1
runN% = runN% + 1

ON PLAY(10) GOSUB BackgroundMusic
PLAY ON

SELECT CASE switchS%
   CASE 0
        switchS% = 1
        SELECT CASE TitleS%
           CASE 0
                IF note% <> 0 THEN note% = 1
                GOSUB BackgroundMusic
                GOSUB SetUp
                GOSUB SplashScreen
                action% = 0
           CASE 1
                action% = 0
           CASE ELSE
                TitleS% = 0
                action% = 1
        END SELECT
   CASE 1
        switchS% = 0
        SELECT CASE TitleS%
           CASE 0
                action% = 1
           CASE 1
                GOSUB ConfigData
                SYSTEM
                END
           CASE ELSE
                TitleS% = 0
                action% = 1
        END SELECT
   CASE ELSE
        switchS% = 0
        action% = 1
END SELECT

IF action% = 0 THEN
   GOSUB ConfigData
   RUN ".\Sequence\Seq01.bas"
ELSE
   GOTO Quit
END IF

END
« Last Edit: August 07, 2011, 07:23:22 am by Chrysippo » Report Spam   Logged

Share on Facebook Share on Twitter

GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #1 on: August 06, 2011, 11:18:49 pm »

Chrysippo,
 Hello, and welcome to the forum, Like I said in the PM, it still would be easier if you can post the code here,...so others can see it , and explain,...
Below is a game done by Terry Richie, it uses the _sndplay as I mentioned, and is very well remarked, so you may find it useful (besides it is a fun game)

http://dl.dropbox.com/u/10291175/SMEGABUG.zip
From Garry
Edite:   Here is more on _sndplay http://qb64.net/wiki/index.php?title=SNDPLAY
Sorry I can't be of more help,..
from Garry
« Last Edit: August 06, 2011, 11:26:45 pm by GarrisonRicketson » Report Spam   Logged

GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #2 on: August 08, 2011, 12:25:59 am »

Chrysippo,
 I am glad to see you posted the code, now I am curious too, as to what
changes are needed to be able to run it with qb64,...So hopefully we get some feed back in the next day or 2,..
From Garry
Note, Take a look at this , it may help you alot,..

http://www.qb64.net/forum/index.php?topic=4154.msg42195#msg42195
 I have not yet had a chance to try it, and it is real late for me,..But Pete is usually pretty reliable,..
from Garry
« Last Edit: August 08, 2011, 01:52:42 am by GarrisonRicketson » Report Spam   Logged

Chrysippo
Newbie
*
Posts: 2


« Reply #3 on: August 10, 2011, 05:46:33 am »

Garry

Thanks. Pete's neat little routine converts all the basic files without running any. In fact among the FAQs there is reference to using -c when file conversion only is wanted. For someone who, in the days of manuals, used to be keen on quoting RTFM I now feel a little contrite at my own impatience - thought I was immune to the culture of instant gratification. Now I wonder at the routine writing skills of others as QB64 seems to have no trace facility when 99.9% of my code composing time is spent debugging and refining; does suggest acquiring thorough mastery of QB64 commands before using them, ie lots of reading, rather than experimenting.
Report Spam   Logged
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #4 on: September 05, 2011, 09:53:59 pm »

Thats good I am glad it hellped.
from Garry
Report Spam   Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy