Creating Libraries

 BBS: Inland Empire Archive
Date: 03-11-92 (01:11)             Number: 74
From: JEAN CREPEAU                 Refer#: NONE
  To: RICHARD VANNOY                Recvd: NO  
Subj: Creating Libraries             Conf: (2) Quik_Bas
In a message to ALL, RICHARD VANNOY wrote:
LIB.BAS" to "LIB.BAS" (or  "LIB.LIB). As soon as  I removed the hyphen,  it
    worked fine. I  presume the "rule"  I violated was  "Library file names
    must not  have imbedded  hyphens.", but  I never  knew or  read of that

RV=> works fine in the environment, works fine compiled, but won't work  in
    a library. When I  went back and put  the percent signs in  (LOCATE x%,
    y%), everything worked fine.

        The thing is that hypen is a command for LIB... When you type
                C>LIB INP-LIB.LIB [...]
        LIB tries to  remove the LIB.LIB  module from the  INP.LIB library!
You cannot use any -,  +  or * in  your library names (I don't  know if you
include  your  lib  names  into  double  quotes)... Because these signs are
commands for LIB.

        For your second problem, you probably forgot to add a DEFINT a-z at
the  beginning  of  your  independent  module... Probably, in your original
program, there was a DEFINT a-z at  the beginning. That way, x and y  would
be interpreted as x% and y%. When you extracted your sub from your program,
you didn't copy the DEFINT. So QuickBASIC used the default DEFSNG a-z and x
and y were  interpreted as x!  and y! instead  of x% and  y%. To solve this
problem, you either:
        - Add a DEFINT sentence
        - Use x% and y% everywhere in your sub (as you did)
        - Declare x and y AS INTEGERS (SUB name(x AS INTEGER, etc...)
 * Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)
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