tags:

views:

28

answers:

2

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 marker. Is there a common/semi-standard way to indicate this? Or, what way would people find least surprising?

A: 

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.

dwj
There could be hundreds or even thousands of lines in the file, and it will often be desirable to do a test run with only the first few enabled and the rest disabled, so commenting out the disabled ones isn't very practical.
rwallace
+1  A: 

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.

drawnonward