PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] clarification on command-line arguments
Date: Thursday, 19 Mar 2020, 08:46:25


    > Message Posted By: Unknown
    >
    > The specs state "If POS is not specified, then its default value is 0 and
    > the name of the first file may not begin with a -."

This means that if the first argument begins with a -,
Qsort should treat is as specifying -POS[,LEN] whether
or not the user intended this; and if the format is not
valid, Qsort should issue an error message and exit.
=====

    ...
    > Can we assume that if argv[1] starts with '-', then POS is specified? (and
    > if whatever following '-' is not an integer, then an error is displayed
    > and the program quits).

Yes.

--Stan-
PREV INDEX NEXT