chromatin2 当前离线
列兵
评分人数
bailong360 (zhonghua)当前离线
上尉
@Echo Off Call :10x16 Var=123456789 Set /A Var2=%Var% Echo 123456789=^>%Var%=^>%Var2% Pause&Exit :10x16 @Echo Off&SetLocal EnableDelayedExpansion&Set Num=%~2&Set Str=0123456789abcdef For /L %%i In (1 1 8) Do (If !Num! neq 0 ( Set /A Mod=Num%%16,Num/=16&For %%j In (!Mod!) Do Set Out=!Str:~%%j,1!!Out!)) EndLocal&Set %~1=0x%Out%&Goto :Eof复制代码
TOP
cobat 当前离线
三级士官
@echo off&setlocal enabledelayedexpansion set "$=0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f" set n=-1&for %%a in (%$%) do for %%b in (%$%) do set/a n+=1&set #!n!=0x%%a%%b for /l %%a in (0,1,255) do echo %%a=!#%%a! pause复制代码
pcl_test 当前离线
荣誉版主
'&cls&@echo off&cscript -nologo -e:vbscript %~fs0 & pause &exit /b num=16 WScript.echo num & "(Dec) => "& Hex(num) & "(Hex)"复制代码
[Convert]::ToString(16,16)复制代码
@if (0)==(0) echo off cscript -nologo -e:jscript %~s0 pause & exit @end var a = 16 WScript.Echo(a.toString(16))复制代码
CrLf 当前离线
论坛巡查
@echo off cmd /c exit /b 123456789 echo %=exitcode% pause复制代码