BBS: Inland Empire Archive Date: 06-10-92 (22:11) Number: 157 From: KEVIN GRAHAM Refer#: NONE To: DAVID RUZICKA Recvd: NO Subj: Switches & Parameters Conf: (2) Quik_Bas
dr>Does anyone know how to pass switches or parameters to a
dr>basic program? Any dr>code would be helpful.
you have
PROGRAM -S -P13
'StatusSwitchS
select case instr(lcase$(command$), "-s")
case is > 0
StatusSwitchS = TRUE
case else
StatusSwitchS = FALSE
end select
'StatusSwitchP
select case instr(lcase$(command$, "-p")) case is > 0 StatusSwitchP =
val(left$(right$(command$, (len(command$) -
instr(lcase$(Command$), "-p") - 2)),
instr(left$(right$(command$, (len(command$) -
instr(lcase$(Command$), "-p) - 22)), chr$(32)) case is =
0 StatusSwitchP = FALSE end select
END
Hmm.... Too bad I'm limited to 80 colums <grin>.... Oh
well.... Hope this helps.... (excuse if there's any
little typos... Got all this out of a program I just
finished, so I may have some )'s off....
^
^
K
<<KAG<<
G
^
^
---
* Origin: The Cracker Barrel BBS : Falmouth, VA : 703-899-0020 (1:274/24.0)

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