Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 7 08:10:49 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m87FAnfB007670 for ; Sun, 7 Sep 2008 08:10:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m87F9YLE012062 for ; Sun, 7 Sep 2008 08:09:34 -0700 Message-Id: <200809071509.m87F9YLE012062@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Command line input Date: Sun, 07 Sep 2008 08:09:34 -0700 From: Bill Cheng Someone wrote: > for the warmup project # 1 of cs551, in case of command line inputs, do we > have to validate only the cases mentioned in the project grading guidelines > or all possible cases ? > > for eg: for server , if server -t -m 12345 is typed on the command line, its > an error but this case isnt considered in the grading guidelines. I think you misunderstood what the commandline syntax is about. For the server, the commandline syntax is: server [-t seconds] [-d delay] [-m] port This is not an example. This specifies *exactly* what the commandline syntax is! So, if the user gives something *incorrect*, you should not run the server and tell the user why the commandline syntax is violated. You should not try to enumerate all possible form the commandline can take. You should parse the commandline argument in a reasonable way. Please go to the web and look for examples. -- Bill Cheng // bill.cheng@usc.edu