3 // (C) 2001 Frank R. Schaefer
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 //////////////////////////////////////////////////////////////////////////////////////
20 import java.lang.String;
22 public class Nominus {
23 public static void main(String args []) {
24 GetPot cl = new GetPot(args, "Nominus");
26 // if( cl.size() == 1 || cl.search("--help", "-h") ) print_help();
28 // print out all argument that do not start with a minus
29 String nm = cl.next_nominus();
31 System.out.println("[" + nm + "]");
32 nm = cl.next_nominus();
37 // now get the whole vector at once
38 String[] files = cl.nominus_vector();
39 for(int i=0; i<files.length ; i++)
40 System.out.println("<" + files[i] + ">");
44 static void print_help() {
46 System.out.println( "Example to use nominus arguments:");
47 System.out.println( "USAGE:");
48 System.out.println( "--help, -h get some help about this program.");
50 System.out.println( "any option that does not start with '-'");
51 System.out.println( "will be printed on screen twice.");