![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-24 09:02 |
47,815 topics / 349,928 posts / today 0 new / 48,287 members |
| DOS批处理 & 脚本技术(批处理室) » [Joint Participation] [Challenge Ideas] [Batch Processing Floating-Point Operations] |
| Printable Version 47,109 / 136 |
| Floor121 不得不爱 | Posted 2006-10-23 03:55 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
Hehe, it's not explanations, it's just that Chinese labels were used. With Chinese labels, even explanations can be omitted!
|
|
| Floor122 vkill | Posted 2006-10-23 03:57 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by qwe1234567 at 2006-10-23 03:55: Chinese works too, huh. Haven't tried it yet, not sure how many Chinese characters are supported at most |
|
| Floor123 不得不爱 | Posted 2006-10-23 04:18 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
This is also my first time using Chinese labels. I think there probably isn't a limit on the number
|
|
| Floor124 不得不爱 | Posted 2006-10-23 04:19 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
Also, variables can be Chinese too
|
|
| Floor125 vkill | Posted 2006-10-23 04:31 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by qwe1234567 at 2006-10-23 04:18: Letters are 8, so I think there should be one. Test it and see |
|
| Floor126 vkill | Posted 2006-10-23 04:35 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
Turns out there really is no limit, hehe~ I'll use Chinese for labels from now on
|
|
| Floor127 不得不爱 | Posted 2006-10-23 04:43 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
I tried it. In CMD, letters aren't limited to just 8 either (I guess there isn't much of a limit, or maybe it's 255). You can test it with the following code
@echo off :abcdefghi set /p a=Please enter: if %a%.==5. (goto abcdefghi) else goto abcdefghi1 :abcdefghi1 echo %a% pause |
|
| Floor128 xycoordinate | Posted 2007-03-04 23:15 |
| 中级用户 Posts 228 Credits 493 From 安徽 | |
Originally posted by namejm at 2006-10-4 21:08: Excellent!!!! Most decimals used in daily life are "amounts of money", with only 2 decimal places, so "Method 2" is better! This thread gave me a lot of inspiration, thanks everyone!!! ![]() [ Last edited by xycoordinate on 2007-3-4 at 10:51 AM ] |
|
| Floor129 6622186 | Posted 2007-03-10 08:17 |
| 高级用户 Posts 411 Credits 894 | |
|
If this could be changed into a command-line version (when using it, enter the filename and the corresponding parameters), that would be great.
|
|
| Floor130 6622186 | Posted 2007-03-10 09:02 |
| 高级用户 Posts 411 Credits 894 | |
|
Labels can also use Chinese, learned something!
|
|
| Floor131 netbenton | Posted 2009-04-05 12:29 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
[ Last edited by netbenton on 2009-4-5 at 10:30 ] |
|
| Floor132 czl1378 | Posted 2009-04-05 14:46 |
| 初级用户 Posts 114 Credits 161 | |
|
The one on the 4th floor is like a heavenly book...
But why go so deep into floating-point operations? I haven't seen many batch files that actually need floating-point calculations. You experts really are too bored. |
|
| Floor133 netbenton | Posted 2009-04-07 09:01 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
| Floor134 mmh1 | Posted 2009-04-09 00:12 |
| 初级用户 Posts 24 Credits 20 | |
|
What does this line mean??
if "%number1:~0,1%"=="." set number1=0%number1% |
|
| Floor135 xrw | Posted 2009-05-23 17:47 |
| 新手上路 Posts 5 Credits 5 | |
|
What does this line mean??
if "%number1:~0,1%"=="." set number1=0%number1% |
|
| Prev 1 … 6 7 8 9 10 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |