Closed GHNewbiee closed 1 year ago
@GHNewbiee
I think have got the point, but until I'll try to implement it I am not completely sure, probably I'll start with the other enhancements that are more clear for me (but I you can give the priority and, in case, I can start with this if you prefer).
Kind regards
I do not have any specific priority. The scope of my program can be implemented w/o any of the suggestions I have made. They are all for the improvement of FLAP. As the creator of the FLAP you have to decide which suggestions are within the scope and the spirit of it. In addition, there is not any rush at all; think and take your time.
Thank you for all the responses!
Kind regards, too.
IMHO, you should spend more time thinking about the implementation of this enhancement than that of exclude
. The former has to maintain compatibility which is more "concern-able/difficult". For the latter, compatibility is not a concern at all.
@GHNewbiee
I have just uploaded a patched version that should implement what you required.
I have added a test (quite long, I am sorry, but I have needed to test many scenarios): there you can see the usage of the new attribute val_required, when it is set to false you can omit the value even if you pass the CLA switch relying on the default value. This new attribute applies to all kinds of CLA with store action attributes (scalar and list). It is required to be a named CLA, obviously.
It this implementation is good enough I will update the documentation soon.
Cheers
@szaghi I will try it within the week. If not, definitely by the end of it. Tal for the quick implementation of this enhancement.
@szaghi
when it is set to false you can omit the value even if you pass the CLA switch relying on the default value.
In summary:
is_switch_passed | is_value_required | is_value_declared | final_passed_value |
---|---|---|---|
T | T | T | declared |
T | T | F | error |
T | F | T | declared |
T | F | F | default |
F | T | default | |
F | F | default |
Is it correct?
@szaghi
when it is set to false you can omit the value even if you pass the CLA switch relying on the default value.
In summary:
is_switch_passed is_value_required is_value_declared final_passed_value T T T declared T T F error T F T declared T F F default F T default F F default Is it correct?
Yes
I need a switch (eg.
--output, -o
) with the following requirements:is_passed
method to control the flow-o
; program automatically creates a string by using data readie, program should be possible to run by:
The switch I have tried to use is:
Any workaround for this "crossword" w/o adding an extra logical switch so that
-o
would be omitted (see right below)?It would be convenient if there were an extra logical argument to
cli%add()
such asreqval
which allows an argument w/o value to be passed.Tia
PS: There are (technical or financial) programs which run very often and their output file names are easily standardized like
arg1_..._data1_..._date_time.res
whereargX
anddataX
are set through CL or input data.