Variable Sharing in QB45

 BBS: Inland Empire Archive
Date: 11-23-92 (14:49)             Number: 350
From: JOHN GALLAS                  Refer#: NONE
  To: MICHAEL BAILEY                Recvd: NO  
Subj: Variable Sharing in QB45       Conf: (2) Quik_Bas
MB>the writes (puts) are subs within another .BAS module.  I'm using type
MB>defined record variables and have put the Type statements as well as the
MB>DIM .. AS statements in the Module level of each module. I've tried all
MB>combnations of COMMON SHARED, DIM SHARED, and SHARED statements with
MB>each of the modules and subs, and the variables still aren't being
MB>shared back up to the module level and across to other modules.

You have to have the TYPE for each record in each module, and then
common shared like this:

COMMON SHARED RecordName AS RecordType

or if its an array,

COMMON SHARED RecordName(1 TO etc) AS RecordType

You have to have the same common shared's in each module, and I *think
they have to be in the same order.

 * OLX 2.1 TD * Give it to Mikey...He'll eat anything
--- RyPacker v2.5b
 * Origin: The Ghost Mode - An RyBBS System!  (612)-688-0026 (1:282/3006)
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