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-12 18:26
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » [Help] What is % used for? View 694 Replies 3
Original Poster Posted 2003-07-08 00:00 ·  中国 广西 柳州 联通
初级用户
Credits 108
Posts 1
Joined 2003-07-08 00:00
23-year member
UID 6539
Gender Male
Status Offline
Can anyone tell me what the % symbol is used for under DOS? Thanks!
Floor 2 Posted 2003-07-08 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
A variable, for example %cdrom%: it can take you to the CDROM drive letter (you have to set it first)....
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 3 Posted 2003-07-08 00:00 ·  中国 台湾 中华电信(HiNet)
初级用户
Credits 120
Posts 3
Joined 2003-06-27 00:00
23-year member
UID 5991
Gender Male
Status Offline
If you are executing an external command at >
C>Test 640 480 8
Test --->%0
640 --->%1
480 --->%2
8 ---->%3
and so on
Floor 4 Posted 2003-07-09 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
% is generally used in DOS commands as the marker for defining variables.
What is enclosed in % is generally a variable name.
Also, in batch processing, it is generally used as a formal parameter, together with shift (the displacement command). For details, you can look at posts about batch processing. Or look at the article below:
http://newdos.yginfo.net/dosuse.htm#dosbat
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Forum Jump: