OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Apr 24, 2017 5:00 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: linguistic issue: command line ..
PostPosted: Mon Feb 20, 2017 4:35 pm 
Offline
Member
Member

Joined: Wed Nov 18, 2015 3:04 pm
Posts: 215
Location: San Jose San Francisco Bay Area
How do you distinguish command line switches, parameters, arguments and options.
I think they are used ambiguously a lot.

_________________
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails


Top
 Profile  
 
 Post subject: Re: linguistic issue: command line ..
PostPosted: Mon Feb 20, 2017 6:01 pm 
Offline
Member
Member
User avatar

Joined: Wed Jan 06, 2010 7:07 pm
Posts: 776
In a more general sense, "parameter" usually refers to the formal declaration of an input to a function while "argument" refers to the actual concrete value assigned to a parameter.

_________________
[www.abubalay.com]


Top
 Profile  
 
 Post subject: Re: linguistic issue: command line ..
PostPosted: Mon Feb 20, 2017 9:36 pm 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 752
Users want commands with arguments.
So, you use spaces as argument delimiters.
Users want spaces within arguments (e.g. in file names).
So, you quote arguments.
Users want quotes (and about everything you can imagine) within arguments.
So, you use yet more quotes or some other form of escaping. Perhaps, escaping should've been introduced early on...
Users want your stuff to be compatible with and have a look and feel of what they're used to.
If you haven't felt screwed yet, you are now.

You might find this useful: How Command Line Parameters Are Parsed by David Deley. Especially, if you're a fan of horror movies.

All that even before you start making sense of the command line.


Top
 Profile  
 
 Post subject: Re: linguistic issue: command line ..
PostPosted: Tue Feb 21, 2017 2:15 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7027
Location: Germany
alexfru, the question was linguistic, not technical.

"Switch" implies on/off settings.

"Option" implies something is optional, i.e. you can build a valid command without using any of the options.

Rusky covered parameter vs. argument already.

But yes, many people don't really consider what exactly they are writing in their documentation or tutorial. Precise use of terminology is something of a hallmark of good documentation.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Nable and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group