szaghi / FLAP

Fortran command Line Arguments Parser for poor people
150 stars 34 forks source link

act argument in add( ) subroutine #68

Closed wadudmiah closed 7 years ago

wadudmiah commented 7 years ago

Hello,

In your example code, there is an actual argument called "act" with a value "store":

call cli%add(switch='--string', & switch_ab='-s', & help='a string', & required=.true., & act='store', & error=error)

What exactly is this argument for and what the possible values and their meanings?

Thanks in advance, Wadud.

szaghi commented 7 years ago

@wadudmiah Hi, I am not sure to follow your question.

The argument act is used to select the kind of CLA you are defining, e.g.:

For more details about the definition of CLA refer to the wiki https://github.com/szaghi/FLAP/wiki/CLI-Method-add

Let me know if this help, or give me more details.

See you soon.

szaghi commented 7 years ago

Moreover, the value stored can be of any kind: it is parsed as a string and returned on your demand with the type and kind you want, e.g. -i 65 will store 65 as a string, but with %get method you will obtain an integer, if you want.

wadudmiah commented 7 years ago

@szaghi thanks for your help on this! much appreciated.