China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 01:59
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » A question nobody has ever asked before — the spaces before parameters!!! View 653 Replies 3
Original Poster Posted 2003-10-19 00:00 ·  中国 山东 潍坊 联通
中级用户
★★
Credits 396
Posts 67
Joined 2002-12-03 00:00
23-year member
UID 390
Gender Male
Status Offline
Everyone has definitely seen and used quite a few DOS commands and their parameters. I wonder whether anyone has noticed this question:
Something like "dir /p" is actually the same as "dir/p", and also the same as "dir /p". In other words, whether there is a space before the parameter, and how many spaces there are, does not matter at all!
And "ping 10.72.11.96 -t" and "ping 10.72.11.96 -t" are also the same, but "ping 10.72.11.96-t" is wrong. (It can also be stated as: "ping -t 10.72.11.96" and "ping -t 10.72.11.96" are also the same, but "ping-t 10.72.11.96" is wrong.)

So how does DOS itself define this???
(Actually, anywhere parameters are used—like HTML statements and so on—there should be formatting requirements for parameters, right? And there are strict aspects as well as relaxed ones! Experts, who can sum this up!!!)
Floor 2 Posted 2003-10-19 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
23-year member
UID 7391
Gender Male
From 福建省
Status Offline
I'm not very clear on the specifics, but for most DOS commands you do need to add a space before the parameters. For example, when installing Win98 with setup.exe, if you add parameters, you have to use the format setup /is/ie, otherwise after running for a while it will prompt an error.
I guess commands like DIR and FORMAT just don't have much of a requirement.
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 3 Posted 2003-10-20 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
It depends on each piece of software. Some require it, some don't...
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 4 Posted 2003-10-20 00:00 ·  中国 河南 驻马店 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
The key is in the design—whatever way it is designed, that's the way it is.
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Forum Jump: