开发者

End marker for command line arguments

开发者 https://www.devze.com 2023-01-01 22:00 出处:网络
I\'m writing a program which takes filenames and options on the command line in the usual way, and also can be directed to read arguments from a file. I\'m implementing the semi-standard -- to turn of

I'm writing a program which takes filenames and options on the command line in the usual way, and also can be directed to read arguments from a file. I'm implementing the semi-standard -- to turn off special treatment of subsequent arguments, and # as comment marker.

I also want to implement a marker for 'disregard all arguments from here on', i.e. an end mark开发者_C百科er. Is there a common/semi-standard way to indicate this? Or, what way would people find least surprising?


I would say implement multiline comments. C style /* */ would only work if you are not using wildcards in paths. XML style <!-- --> or asp <%-- --%> or matlab %{ %} might work. I think XML is the most recognized besides C.

This is also more useful than a simple terminator.


I haven't seen anything like that before. Do you envision the end marker being used during debugging/testing of the options in the file? If so, commenting out the unneeded lines seems like the most reasonable thing to do without adding extra complications.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号