Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm working on an old MS-DOS thingy...
#1
Hey all!




I haven't been around here for a while. I have been working on an "old DOS" (or, I'd like it to compile to be used in DOS on Virtualbox) a little like DOSSHELL, or Norton Desktop, just to see if I can do it. But on all of the modules including the Main, I'm getting this error:




[Image: Screenshot-2025-08-22-172617.png]
Reply
#2
If those INCLUDES are older files, they probably have SUBs defined in them.  QB64 wants things ordered:

Variables
Main progrm code
SUBs

New INCLUDE libraries accomplish this by spitting thing out in two files, TYPES, etc in the first and the SUBS, etc in the second.  When you use the library, you INCLUDE the declartions file at the top, have your code, then INCLUDE the library code at the end. 

What are the libraries, and do they have style QB64 INCLUDE files?
Reply
#3
more accurately.  qb64 cannot use "include" files that were meant for quickbasic.  or maybe for freebasic.

this is because qb64 requires non-executable code at the top.  type... end type declarations must be at the top of the program.  before any variable is declared with dim or redim.  could have type... end type declaration inside a subprogram but right below the sub/function header and parameter list.  and before any executable code of the subprogram.  data statements must be after any executable code of the main program.  and before any sub/function definition.

there are some pratfalls with using chain and common shared.  therefore in qb64 you should avoid them.  if you really need to share data between two qb64 programs.  you must use a temporary file.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  plotting shapes not working madscijr 6 618 10-22-2025, 05:29 AM
Last Post: SMcNeill
  why isn't _FULLSCREEN working? madscijr 5 507 09-20-2025, 01:47 AM
Last Post: SMcNeill
  blue circle isn't drawing and print isn't working? madscijr 12 2,298 09-21-2024, 06:13 PM
Last Post: madscijr
  Updating Clock at a different rate to program loop-example not working as expected? dowster 1 590 08-15-2024, 12:06 PM
Last Post: luke
  Spanish accented chars not working Ikerkaz 2 752 03-14-2024, 02:41 PM
Last Post: Ikerkaz

Forum Jump:


Users browsing this thread: 1 Guest(s)