goto

    0热度

    3回答

    我正在为编译器编写一个标记器。我有一个循环遍历字符,然后检查某些条件的开关。然后我需要退出这两个块来写令牌: Token token; while (peekChar() != '\0') { switch (c = nextChar()) { case '(': token = Token(TOKEN_LEFT_PAREN, currentLi

    2热度

    1回答

    我曾经在TI-BASIC中编程,并经常使用goto语句。我已经转向学习java,并且无法弄清楚如何将程序的执行发送到另一行。 这是我的全码: package inputs; import java.util.Scanner; public class Inputs { /** * @param args the command line arguments */ public s

    0热度

    2回答

    这是我的基于文本的聊天应用程序的源代码。 #include <iostream> #include<iomanip> #include<stdlib.h> #include<string.h> #include<stdio.h> #include<time.h> #include<ctype.h> using namespace std; int main() {

    1热度

    2回答

    不幸的是,我拥有一个具有重复标签名称的批量程序。任何人都可以解释为什么GOTO会进入第二个区块的标签,而不是第一个? 代码: @ECHO OFF SET FLAG=1 IF [%FLAG%]==[1] ( ECHO IN THE FIRST IF... GOTO TD_NEXT :TD_NEXT ECHO HERE AT TD_NEXT IN THE FIRST

    0热度

    4回答

    我想表达我的意图的称号,但基本上这是我的批处理命令的“一部分”: set /p "choice=Enter an option: " if %choice% == 1 GOTO Redo if %choice% == 2 GOTO Remove if %choice% == 3 GOTO Notice if %choice% == 4 GOTO Cancel if %choice% ==

    -4热度

    4回答

    我使用C玩,写了这个代码: 1 #include<stdio.h> 2 #define ASK_PROMPT printf("\nDo you want to continue(Y/N):"); 3 main() 4 { 5 char main[20], i; 6 start: 7 printf("Please enter your st

    1热度

    2回答

    基本上我已经完成了为我的小弟弟编写一些小时表测验。我对编程非常陌生,我不知道如何重置我的程序回到开始。任何人都可以对此有所了解吗? #include <iostream> #include <string> #include <fstream> using namespace std; int main() { int sum ; int question = 0; int Ua

    -1热度

    1回答

    我从这里引用 “How can I use goto in Javascript?” 我理解的代码如下 [lbl] first: alert("Test") goto first; 但是。为什么下面的代码不为我 goto end; alert("skipped line"); [lbl] end: 工作,当我运行上面的命令,我会得到一个错误这样

    0热度

    1回答

    我新来PHP和编码是通过上面的代码我想显示的标准列表,并显示每个分部(A-H)复选框老学校 <?php for($i=-2; $i<count($s2)-1;$i++){ ?> <tr> <td> <?php switch ($i) { case '-2': echo "JR KG"; goto a;

    1热度

    2回答

    我正在创建一个批处理游戏,并且我有一个以前的游戏,所以我可以记住代码中的东西。 在游戏中,我正在研究If和Goto命令在哪里不起作用。所以我测试了我之前的游戏,并且在这样的事情上运行得很好。所以我创造了这个: @echo off title test :1 cls echo testing Testing 123 echo Type Go set /p 123= if %123% =