[comp.lang.misc] Quick Basic

dean (02/02/89)

From: dean

Does anybody if the bugs in version 4.0 QUICKBASIC have been worked out?
If not, is there a better type of BASIC around?
jd

trm@moscom.UUCP (Tim McCarthy) (01/12/90)

	I am using QUICK BASIC to create a bowling secretary program and I
	have run into a problem.  When I try to make my program executable
	I get a program memory overflow.  I beeleive this is because of my  
	stack size.  Can anyone help me.  I am almost finished with my 
	program and need help to complete, otherwise I will have to rewrite
	it in another language.  The program by itself takes up 65K.   
					     
					     Thanks, Tim McCarthy 

pwendt@neon.UUCP (Patrick Wendt) (01/16/90)

Hi !
====

trm@moscom.UUCP (Tim McCarthy) writes:

>	I am using QUICK BASIC to create a bowling secretary program and I
>	have run into a problem.  When I try to make my program executable
>	I get a program memory overflow.  I beeleive this is because of my  
>	stack size.  Can anyone help me.  I am almost finished with my 
>	program and need help to complete, otherwise I will have to rewrite
>	it in another language.  The program by itself takes up 65K.   
>					     
>					     Thanks, Tim McCarthy 

I have the same problem than you have, I think, because I can't
compile my BBS-Program (about 200 KB) into an EXE-File, but:

The Stack-Size you may change by using CLEAR , , <size>, for example,
CLEAR , , 5000 sets the stack to 5 kB ... that MAY help ...!!!

But: I have a question to ... Quick-Basic often terminates with
a 'string-area corrupt' or 'far-heap corrupt' , and that errors
are quite dangerous for a running BBS-System, because you can't
prevent them by using ON ERROR GOTO ...

Does anybody know about that errors and maybe how to solve ?

 Greetings ... Pat !

-   Human Zombie   ;  SysOp Berlin By Byte (BBB) - Mailbox (MultiUser QNX)  -
- (Patrick  Wendt) ;  030/8541082 & 8544082 - 1,2/2,4 kBaud, 8/N/1, 24h on  -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Domain: pwendt@neon.UUCP      ; Neon Research Caboose ; Berlin (West) GER -
- Bang .: ...!{pyramid || mcsun}!unido!tmpmbx!einoed!utopia!neon!pwendt     -

forstall@manzanita.Berkeley.EDU (Bruce Forstall) (01/23/90)

(Sorry for the wide distribution, but mail attempts bounced...)

I have a friend who has an answer for a recent posting:
--Bruce
-------------------------------------------------------------
| >From: trm@moscom.UUCP (Tim McCarthy)
| [bowling program, memory overflow, stack size?, 65K program, help?]
|                                              Thanks, Tim McCarthy 

The problem does not have anything to do with the stack.  What is happening
is that you are overflowing the maximum code size for a segment.

In the interpreter, each SUB/FUNCTION in a program is treated as an
individual unit, thus you are limited to 64K for a single SUB/FUNCTION.
The compiler, however, treats all items in a module as a single unit, thus
the maximum size of a module is 64K.  Thus, it is possible to have a program
that works fine in the interpreter but will not compile because you have
exceeded the maximum module size.

The way to avoid this problem is to break your program into seperate modules.
(If it helps: in QuickBasic terminology, a module is identical to a file.
It took me quite a while to figure out this highly useful fact.)  The easiest
way to do this is in the interpreter:
    - File/Create  to create a new module
    - View/Subs/Move  to move individual subs/functions to the new module