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-08 22:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question: Why are there four % signs here? Can someone explain it? View 728 Replies 1
Original Poster Posted 2008-05-28 19:38 ·  中国 江苏 苏州 电信
初级用户
Credits 47
Posts 46
Joined 2008-01-17 19:01
18-year member
UID 108862
Gender Male
Status Offline
The batch file code is as follows:
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
set /a na=%random%%%5+1 & start !na!.txt

Question: why are there four % signs here? I can understand the first two, but not the ones after that!! Can someone explain it?
Floor 2 Posted 2008-05-28 20:43 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
批处理之家新域名:www.bathome.net
Forum Jump: