BBS: Inland Empire Archive
Date: 03-06-92 (18:09)             Number: 161
From: RICHARD VANNOY               Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: CREATING LIBRARIES             Conf: (11) Modula-2

After much wailing and gnashing of teeth, I finally built my first QuickBASIC Library! I found out two things I want to mention that others might be able to learn from or help me learn more about. I beat my head against the wall for more hours than I care to admit trying to get my first library to compile. The problem, which seemed strange to me was: One of my half a dozen SUBs "INP-LIB.BAS" would not compile. The compiler kept barfing and telling me that it couldn't find LIB.LIB. I went nuts trying to figure that one out until I somehow realized that the compiler had truncated "INP-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 rule. The second thing I found strange was that variables kept going to zero. I discovered that: SUB GetInteger(x%, y%, digits%) . LOCATE x, y 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. > MegaMail 2.1b #0:"Daddy, what does FORMATTING DRIVE C mean?" --- WM v2.01/91-0012 * Origin: Com-Dat BBS Hillsboro, OR. HST (503) 681-0543 (1:105/314)
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