BBS: Inland Empire Archive Date: 05-20-92 (10:21) Number: 135 From: JEAN CREPEAU Refer#: NONE To: MIKE KRUPPENBACHER Recvd: NO Subj: Re: Question Of The Day! Conf: (2) Quik_Bas
In a message to JEAN CREPEAU, MIKE KRUPPENBACHER wrote: MK=> Umm.. I cut this up some.... But I have a question.. why do it this way instead of MK=> SHELL "DIR | SORT > DIR.SRT" MK=> and then open and read dir.srt? wouldn't that be an easier way to get a directory AND a way to ignore the QB.LIB which seems to conflict somehow with modem routines? Because SHELL "DIR" requires much more memory (you need to load COMMAND.COM in memory). Because it creates a file (which is not necessarly desirable), because it's much slower (to load COMMAND.COM, to create a file and to do a DIR) and because you don't have access to all the files you want. With FindFirst and FindNext, you only need the INTERRUPT[X] sub- routine to be linked with your object file. DOS' DIR use these two function also... But using them in your program directly let you access special files (if you want to) like VOLUME label, system and hidden files and sub- directory. Modifying the FindFirst subroutine a little lets you ignore these files or include them if you want (for example, you can chose to dir only the normal files (without getting the subdirectories)). DIR doesn't offer you that flexibility. I know, writing SHELL "DIR >" is much easier to do, but it's not very professionnal. By the way, QB.LIB should not comflict with your modem subroutines. Unless you want to use QB.QLB (which is not the same...). If you want to use QB.QLB and another quicklibrary, then you can't... you have to make only one library like this: LINK /Q MODEM.LIB+QB.LIB,,NUL,BQLB45; This will link QB.LIB and MODEM.LIB to create MODEM.QLB which will contain all the subroutines you need to do your modem things and directories. Jean --- * Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)
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