MAKE LIBS

 BBS: Inland Empire Archive
Date: 03-14-92 (13:49)             Number: 181
From: MARK BUTLER                  Refer#: NONE
  To: WARREN MILLER                 Recvd: NO  
Subj: MAKE LIBS                      Conf: (2) Quik_Bas
 On 03-10-92 Warren Miller wrote to All...

 WM> I don't want to sound to stupid but how do you make Librarys' and what
 WM> can you place in them. I have several common routines and functions
 WM> that I use, but the command to make libs eludes me. Also how do you
 WM> use them in code?
 WM>
 WM> Also is there a standard in terms of code?

 Compile your subs/functions to objs. Then...

 LIB MYLIB +FIRST.OBJ +SECOND.OBJ +THIRD.OBJ;

 This subject is covered quite well in the manual, for more details look
 there.

 As far  as "standards" goes the parameters you pass to the
 subs/functions in your library need not have the exact same name(s) but
 they must be the same type(s). For example, let's say you have a sub
 called "SearchReplace" in your qlb. Even if it's in a qlb/lib you still
 need to declare it at the head of your main module right? Like so....

 DECLARE SUB SearchReplace (OldString$, NewString$, errcode%)
                            ^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^
                                |           |           |
                                +-----------+-----------+
                                            |
 when you call it you don't have to use these parameter names _but_ you
 must use the same parameter types and in the same order. That is, when
 you call this sub the parameter order and type MUST be 'string, string,
 integer' right? These would be valid calls to your sub...

           CALL SearchReplace (FoundStr$, ReplaceStr$, RetCode%)

                                 ...or...

           CALL SearchReplace ("many", "mucho", returnerr%)

 The following calls would NOT be valid...

           CALL SearchReplace (RetCode%, FoundStr$, ReplaceStr$)

                                 ...or...

           CALL SearchReplace (OldString$, NewString$)


                                 ...or...

           CALL SearchReplace (OldString$, NewString$, errcode!)
                                                              ^
                                                              |
                 [wrong numeric variable type]----------------+


 In the above 3 examples the parameters are not listed in the correct
 order or the parameter count is different or they are not the same
 type. Does that help you out any?

 --------------> MHB :-)


... OFFLINE 1.36 * PARANOID - One who is badly in touch with reality.
--- DB B1061/001271
 * Origin: * Bare Bones BBS * (1:105/360)
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