我崩溃了,想知道这个批处理脚本中的错误在哪里,用于通过递归函数" pow"来计算给定数字的幂,多次pow的顺序(在脚本中设置为pow o 3 ^ 3)
我得到的错误是: " order1"不被识别为内部或外部命令,可操作程序或批处理文件。 " base22"不被识别为内部或外部命令,可操作程序或批处理文件。 这两个错误都显示在序列行中,无数次,直到语句"批处理递归超过堆栈限制"竞争停止递归。 有人能够在脚本中找到错误吗?
@echo off
set /a base1=3
set /a base2=3
set /a order=3
call :pow %base1%, %base2%, %order%
EXIT /B %ERRORLEVEL%
:pow
set /a base11=%~1
set /a base22=%~2
set /a order1=%~3
order1=order1-1
base22=base11*base22
if %order1% GTR 0 (call :pow %base11%, %base22%, %order1%)
else(echo the calculated pow is %base22%)
EXIT /B 0
答案 0 :(得分:0)
以下是我将如何考虑在批处理文件中执行此操作:
#section1 {
background-color: #e6ecf0;
padding-top:20px; padding-bottom:20px; /**bluey white**/
}
<div class="col-md-4 col-sm-12">
<table class="points_table">
<thead>
<tr>
<th><h4>Premium domains</h4></th>
</tr>
</thead>
<tbody class="points_table_scrollbar">
<tr class="odd">
<td class="col-xs-7">Bidder.co.uk</td>
<td class="col-xs-3">24hr</td>
<td class="col-xs-3">£200</td>
<td class="col-xs-12"><a class="btn btn-warning" href="#">button</a></td>
</tr>
<tr class="even">
<td class="col-xs-1">2</td>
<td class="col-xs-7">Test Points 2</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">3</td>
<td class="col-xs-7">Test Points 3</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">4</td>
<td class="col-xs-7">Test Points 4</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">5</td>
<td class="col-xs-7">Test Points 5</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">6</td>
<td class="col-xs-7">Test Points 6</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">7</td>
<td class="col-xs-7">Test Points 7</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">8</td>
<td class="col-xs-7">Test Points 8</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">9</td>
<td class="col-xs-7">Test Points 9</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">10</td>
<td class="col-xs-7">Test Points 10</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">11</td>
<td class="col-xs-7">Test Points 11</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">12</td>
<td class="col-xs-7">Test Points 12</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">13</td>
<td class="col-xs-7">Test Points 13</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">14</td>
<td class="col-xs-7">Test Points 14</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">15</td>
<td class="col-xs-7">Test Points 15</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">16</td>
<td class="col-xs-7">Test Points 16</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">17</td>
<td class="col-xs-7">Test Points 17</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">18</td>
<td class="col-xs-7">Test Points 18</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="odd">
<td class="col-xs-1">19</td>
<td class="col-xs-7">Test Points 19</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
<tr class="even">
<td class="col-xs-1">20</td>
<td class="col-xs-7">Test Points 20</td>
<td class="col-xs-1">10</td>
<td class="col-xs-1">0</td>
<td class="col-xs-1">5</td>
<td class="col-xs-1">1</td>
</tr>
</tbody>
</table>
请注意,您将受到最大32位整数的严格限制。