BBS: Inland Empire Archive
Date: 02-15-93 (14:23)             Number: 348
From: JOE NEGRON                   Refer#: NONE
  To: DEREK LYONS                   Recvd: NO  
Subj: Quickbasic                     Conf: (2) Quik_Bas
JN| I don't think it is a nicer fix.  I prefer to use a fairly standard way
  | of doing something.  I prefer a FUNCTION rather than patching the libs.

DL> Look in the back issues of QBNews...  There is several pieces of code
  > for getting the command line in it's original capitalization...

Thanks, Derek, but didn't you catch my earlier message where I posted
this function?  I've been using it for quite a while:

============================== Begin code ==============================

'$INCLUDE: 'qbx.bi'


'* FUNCTION CmdLine$
'*    Uses DOS ISR 21H, Function 51H (Get PSP Address) to return the
'*    command line unmodified.  COMMAND$ is capitalized by BASIC, hence
'*    this function.
'*    QBX.LIB
'*    -------
'*    SUB Interrupt (IntNum%, IRegs AS RegType, ORegs AS RegType)
   DIM IRegs AS RegType, ORegs AS RegType

   IRegs.ax = &H5100
   Interrupt &H21, IRegs, ORegs
   PSP% = ORegs.bx                           'Segment returned in BX
   Offset% = &H80                            'Offset% of command line

   DEF SEG = PSP%                            'Access PSP segment
   CmdLen% = PEEK(Offset%)                   'Get command line length
   Cmd$ = SPACE$(CmdLen%)                    'Read parameters....

   FOR I% = 1 TO CmdLen%
      MID$(Cmd$, I%, 1) = CHR$(PEEK(Offset% + I%))

   NEXT I%

   DEF SEG                                   'Restore DGROUP

   CmdLine$ = RTRIM$(Cmd$)                   'Return value
   Cmd$ = ""
=============================== End code ===============================

                                --Joe in Bay Ridge, Brooklyn, NY--
                                      Mon  02-15-1993, 14:23

... Woman who seek equality with men lack ambition.
 X Blue Wave/QWK v2.12 X

--- Maximus 2.01wb
 * Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
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