BBS: Inland Empire Archive
Date: 02-02-93 (00:08) Number: 389
From: JOE NEGRON Refer#: NONE
To: RAYMOND PAQUIN Recvd: NO
Subj: Re: QuickBASIC Conf: (2) Quik_Bas
JJ> I don't think you need to use UCASE$ as COMMAND$ always returns
> uppercase anyway.
RP> Since this is a QuickBASIC conference, you are technically right.
> But I *SEEM* to remember that PDS doesn't do that. I could be wrong.
No, unfortunately, PDS also capitalizes COMMAND$. You can retrieve the
command line, case preserved, with the following:
========================== Begin CMDLINE.BAS ===========================
DECLARE FUNCTION CmdLine$ ()
FUNCTION CmdLine$ STATIC
DIM IRegs AS RegType, ORegs AS RegType
IRegs.ax = &H5100
Interrupt &H21, IRegs, ORegs
PSP% = ORegs.bx
Offset% = &H80
DEF SEG = PSP%
CmdLen% = PEEK(Offset%)
Cmd$ = SPACE$(CmdLen%)
FOR I% = 1 TO CmdLen%
MID$(Cmd$, I%, 1) = CHR$(PEEK(Offset% + I%))
CmdLine$ = RTRIM$(Cmd$)
Cmd$ = ""
=========================== End CMDLINE.BAS ============================
--Joe in Bay Ridge, Brooklyn, NY--
Tue 02-02-1993, 00:08
... It is completely dark. You may be eaten by a grue.
X Blue Wave/QWK v2.12 X
--- Maximus 2.01wb
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)