有一个脚本是这样的 cmd1 cmd2 if [ $? != 0 ] ?????如果cmd2运行错了,就跳过cmd3,直接运行cmd4, 如何实现, shell 有 goto or lable什么功能吗 跳到cmd4运行。 fi cmd3 cmd4
*QRG7047 THE goto BRANCHES FROM DETAIL THE CALCULATION TO THE subtine calculation specification ignored. :send target of detail goto or cabxx is inside subroutine. [code]...... goto send ........ ...... SEND TAG SETON LR 请帮忙提示哪里会有问题?? [/code]
要实现goto的效果该怎么办呢? 效果就和c语言中的goto一样。就是直接跳过一段代码执行。要求不用到{} 用到的地方 start(); code... $cache->end(); code... ?> function start() { code... if($cache) goto end; } function end() { end code... } 就是在类中实现一个部分缓存的东西,如果已经缓存好了,就跳过中间代码,直接到end部分,然后处理显示。 如果你们有什么好办法,不妨共享下。 好象我这...