What is the convention for Command Prompt window arguments

A

academic

What is the convention for Command Window arguments?

If I write a program called QQQ that takes one argument should I expect a
user to type:

QQQ arg
QQQ -arg
QQQ /arg

or what?


That is, what is the natural thing for Windows users to expect a program to
looks for?


Thanks
 
W

William DePalo [MVP VC++]

academic said:
What is the convention for Command Window arguments?

Personal preference? While little command line utilities have their place,
the command line is no one's idea of a modern user interface. said:
If I write a program called QQQ that takes one argument should I expect a
user to type:

QQQ arg
QQQ -arg
QQQ /arg

or what?


That is, what is the natural thing for Windows users to expect a program
to looks for?

Those of us who grew up on operating systems from DEC see

QQQ /opt1 /opt2 ... /optM filename1, filename2 ... filenameN

as "natural" while those with a 'nix background probably prefer

QQQ -opt1 -opt2 ... -optM filename1, filename2 ... filenameN

and for them it is not unusual (I think) to see intervening white space
between the "-" and the option.

I'd suggest that you allow both forms.

Regards,
Will
 
A

academic

Thanks, Windows doesn't have it's own convention? Like maybe none of the
above?




When I retired I was using VAXes
What happened to them.
Is VMS still alive?
I always like the user interface of VMS
 
W

William DePalo [MVP VC++]

academic said:
Thanks, Windows doesn't have it's own convention? Like maybe none of the
above?

Well, I don't know that it is written in stone anywhere, but the notation
using slashes (/) is more common than the one with dashes (-).

Take the dir command for example. If you type

dir /ah

you'll get a listing of files with the hidden attribute. If you type

dir -ah

you'll get a "File not found" message.
When I retired I was using VAXes
What happened to them.

DEC crashed and burned.
Is VMS still alive?

I think that there may still be something called OpenVMS around but I know
nothing about it. You may want to try googling for it.
I always like the user interface of VMS

Well, you can't go wrong with an o/s designed by David Cutler. IMO, his have
been the best there is since the 70s - RSX 11/M, VAX/VMS, Windows NT.

Regards,
Will
 
B

Bruno van Dooren

Thanks, Windows doesn't have it's own convention? Like maybe none of the
Well, I don't know that it is written in stone anywhere, but the notation
using slashes (/) is more common than the one with dashes (-).

/ is indeed more common for win cmd utilities. another universal option is
/? which prints out the listing of all possible options with a bit of
information.
I think that there may still be something called OpenVMS around but I know
nothing about it. You may want to try googling for it.

www.openvms.org
I wanted to give it a try, but apparently it only runs on true 64 bit
platforms like itanium and alpha. slightly out of budget for me...
I used openvms once in a GPS simulation system, where the VMS machine was
used for maintaining a model of a sattelite constellation in real-time. it
was rock solid. you could throw any abuse at it, and it would keep going.
I remember it had very long command names.
Well, you can't go wrong with an o/s designed by David Cutler. IMO, his
have been the best there is since the 70s - RSX 11/M, VAX/VMS, Windows NT.

I agree. the linux driver model cannot even begin to compare with the NT
based models.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
A

academic

Thanks


Bruno van Dooren said:
/ is indeed more common for win cmd utilities. another universal option is
/? which prints out the listing of all possible options with a bit of
information.


www.openvms.org
I wanted to give it a try, but apparently it only runs on true 64 bit
platforms like itanium and alpha. slightly out of budget for me...
I used openvms once in a GPS simulation system, where the VMS machine was
used for maintaining a model of a sattelite constellation in real-time. it
was rock solid. you could throw any abuse at it, and it would keep going.
I remember it had very long command names.


I agree. the linux driver model cannot even begin to compare with the NT
based models.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top