Re: Variable Sharing in Q

 BBS: Inland Empire Archive
Date: 11-19-92 (01:39)             Number: 312
From: RAYMOND KEITH                Refer#: NONE
  To: MICHAEL BAILEY                Recvd: NO  
Subj: Re: Variable Sharing in Q      Conf: (2) Quik_Bas
> Anyone know what I'm doing wrong, or am I trying to handle this separate
> module situation incorrectly?

There are two ways to compile a program...

(1) EXE requiring the BRUN45.EXE runtime module.
(2) Stand-alone EXE file.

See your manuals for details but in short, common shared variables are passed
when chaining under compile method 1, and are NOT passed when your program
is compiled as a stand alone .EXE as in method 2. Note: See my QB bug msg
below regarding common shared.

I think the stand alone method is preferable. Here are 4 ways to work around
it...

(1) Save the variables to a file(s) and have the chained programs read them.
(2) Purchase BASIC 7.1 PDS. It supports overlays which is preferable to
    chaining in most cases. It also supports EMS memory. Such a sizable
    program as yours would no doubt benifit from the big guns version of
    QuickBasic.
(3) If you don't have to pass a lot of data, there is some RAM available in
    the host display area. It's in the area reserved for text screen data. A
    text screen takes up 4,000 bytes but 4,096 bytes are reserved for each
    page. Thus 96 bytes X number of text screen pages is available. I just
    read about this little trick. I would guess that area would be cleared
    upon chaining, but the trick specificly mentioned it as a way to pass
    values to a chained program compiled as a stand alone.
(4) Crescent Software's QuickPak Professional programming library supports
    passing large amounts of data between chained programs using EMS memory
    routines.

I think you will find buying BASIC 7.1 PDS the most attractive and useful
option. You and I are basicly hacking at the same type of program. Mine is
made up of 26 seperate modules, quite large. The tools I have picked up to
accomplish such a task are...

Software Tools ---------------------------------------------
-------------------------------
(1) BASIC 7.1 PDS
(2) QuickPak Professional by Crescent Software (general programming library)
(3) Graphics Workshop by Crescent Software (great for graphics mode, a must)
(4) MASM 6.0 This assembler package is nice and at $125 well worth the price.
    If your not familar with assembly, don't let it scare you off. You would
    be surprised how easy it really is to supercharge sections of your
    program with assembly.
(5) Publishers Paintbrush (Windows Version) For designing my VGA 640x480x16
    color windows.
(6) Microsoft Paint (old dos version) For converting 256 color .PCX into 16
    color .PCX.

Reference Manuals

-- (1) Of course the various MS manuals, for what use they are. (2) Programmers Guide to the EGA and VGA cards, second edition. Addison- Wesley publishing. Author: Richard F. Ferraro (3) PC Interrupts a programmers ref to Bios, Dos, and third party calls. Publisher: Addison-Wesley Authors: Ralf Brown and Jim Kyle (4) Microsoft Macro Assembler Bible Publisher: The Waite Group Authors: Nabajyoti Barkakati and Randall Hyde. (5) MS-Dos 5 Programming Publisher: Microsoft Press Author: Peter Aitken (6) Microsoft Mouse programmers reference Publisher: Microsoft Press (7) Basic Techniques and utilities Publisher: Ziff Davis Press Author Ethan Winer. This book comes with a disk and is OUTSTANDING!!! Don't let the title fool you. See my next msg to all regarding this book. COMMON SHARED BUG NOTE: Just a note here on a bug I found a while back. It can be a tough one to figure out. It involves of course the use of common shared statements. If ALL the common shared lines which are in your main module are NOT included in ALL of your other modules, and if you have experienced seemingly random lockups of your computer, this bug is zapping you. If this is the case, let me know and I will describe the bug in detail so you can test for it's ocurrance and fix it. It is not a random bug and can be created over and over consistantly. It's random appearance is because it occurs under odd but not infrequent conditions. For me, I was working on a secondary module and this bug cropped up every now and then. I started work on another secondary module and it really got bad, locked every time I turned around. Then I began working on the main module again and it disapeard for a couple weeks. When I begain working on a secondary module again, it started locking up again. This gave me enough clues to track it down. Well gota run, Raymond --- DB 1.37/003468 * Origin: Real Estate N.W. BBS Files,Doors,(503)654-5054 24hrs (1:105/224)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET