Page 1 of 1

Difference between Mac and IBM QBasic

Posted: Mon Dec 04, 2023 6:42 am
by skibidiQ
I found this old book from the 80's and in the appendix there are some QuickBasic programs that I want to try out.. the problem is that those were written on and for Apple Macintosh II and I now use Linux PC with DosBox.. The author of the book says that there are some differences in the graphics statements for Mac and IBM..

Some of the programs are just text input and output and those work just fine, but whenever there is a "WINDOW" statement my DosBox outputs an error.. I have never before written anything in QBasic and have been struggling with this WINDOW statement.. Here is a part of the program from the book that uses WINDOW statement:

Code: Select all

WINDOW 1
REM A TWO STROKE ENGINE
WINDOW 2,"CLICK BOX",(201,50)-(400,450),1
PRINT "SELECT BY BUTTON"
WINDOW 3,"CURRENT DATA",(10,50)-(200,450),1
WINDOW 4,"DATA INPUT",(400,50)-(600,450),1
WINDOW 5,"ACTION BOX",(10,430)-(600,480),1
WINDOW 6,"EXHAUST TYPE",(400,50)-(600,450),1
WINDOW 1
100 INPUT"NEW DATA OR FILE DATA (TYPE N OR F)?";D$
IF D$="N" THEN GOTO 110
IF D$="F" THEN GOSUB FILED
110 WINDOW 3
CLS
when I run the whole program I get an error saying "Expected: SCREEN or ( or end-of-statement"
I looked at some tutorials on qbasic and graphics and it seems that the WINDOW statement is used differently on Mac

Can anybody help me change the program so I can run it on DosBox ?
also, I see a "BUTTON" statement .. and can't find it in any reference manual



https://postimg.cc/QBF6D8Hs
https://postimg.cc/VrMDSKqV
https://postimg.cc/qtW1MP3K
https://postimg.cc/K1q9CkcJ

Re: Difference between Mac and IBM QBasic

Posted: Tue Dec 05, 2023 7:33 am
by skibidiQ
so far I have concluded that the "WINDOW" command can either be used differently on Mac or it is just a user-defined function.. because the statement is used differently throughout the program.. for example, in the first picture in first row you can see only "WINDOW 1" and in the 6th row there is "WINDOW 3, "CURRENT DATA", (10,50)-(200,450),1

I think the function just takes the first argument as the `window order number`, "title" argument, for this example:

Code: Select all

CURRENT DATA
, then the standard WINDOW statement argument, for this example:

Code: Select all

(10,50)-(200,450)
and than another number argument, which could be the color or something

can that be the case here? can you name your user-defined functions the same name as the standard statements, namely WINDOW in this example ?