Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 1 and Version 2 of code/doc/CommandLine


Ignore:
Timestamp:
Sep 4, 2008, 7:49:14 PM (16 years ago)
Author:
rgrieder
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/CommandLine

    v1 v2  
    1818== Retrieving a value ==
    1919Getting the values is quite easy via the static interface of the CommandLine class. Use getArgument(name) to retrieve the entire argument including the information whether the default value was used or not (i.e. argument given in command line or not). And use getValue(name, *value) to get the value directly. [[br]]
    20 Be careful with the types. If you declare an argument as (int), you will have to retrieve it with an (int)-type variable.
     20Be careful with the types. If you declare an argument as (int), you will have to retrieve it with an (int)-type variable. An example:
     21{{{
     22int myVar;
     23CommandLine::getValue("port", &myVar);
     24
     25CommandLineArgument<int>* myArg = CommandLine::getArgument<int>("port);
     26}}}
    2127
    2228== Passing command line parameters ==