PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] No arguments for Qsort?
Date: Tuesday, 07 Apr 2020, 08:00:13


    > Message Posted By: Unknown
    >
    > Is it fine if our program prints nothing to stdout when no command-line
    > arguments are specified for Qsort, but it does print to stderr?

The calling convention for Qsort

  % Qsort [-POS[,LEN]] [FILE]*

does not require any arguments, which means that no
error message should be issued in that case.

The description of Qsort

  ... reads lines from the files specified; removes their trailing newlines
  if any; sorts them in ascending order using quickSort; and writes the sorted
  lines to the standard output, each followed by a newline.  ...

means that when no files are specified, no lines are read,
none are sorted, and none are output.

--Stan-
PREV INDEX NEXT