frist@ccu.umanitoba.ca (05/16/91)
I would like to read options and filenames from the command line in Microsoft Pascal 4.0. Although MS-Pascal has a function called READFN, this function is inadequate in several respects. First, it requires each argument to be separated by an EOLN character, and secondly, it doesn't seem to be set up for dealing with a variable number of arguments. Thus, Unix-style syntax such as command [options] filenames... is not possible. What I want to do is read in each argument on the command line, or even just read in the entire command line as a string for subsequent parsing. In the Update part of the MS-Pascal 4.0 manual, the Public Variable CESXQQ is defined as "DOS-saved ES value (for command line)". This sounds like something I might be able to use for getting the command line, but I don't know how to use it. Any help with this problem would be greatly appreciated. =============================================================================== Brian Fristensky | Department of Plant Science | "There's a big ... machine in the sky... University of Manitoba | some kind of electric snake... coming Winnipeg, MB R3T 2N2 CANADA | straight at us." frist@ccu.umanitoba.ca | "Shoot it," said my attorney. Office phone: 204-474-6085 |"Not yet," I said,"I want to study its habits" FAX: 204-275-5128 |H.S. Thompson, FEAR & LOATHING IN LAS VEGAS ===============================================================================