表达式开头的关键字无效(lolcode)

时间:2018-03-25 16:22:14

标签: lolcode

我刚开始使用LOLCODE。我尝试制作一个程序,测试输入是否为NUMBR,但我在第13行(IM OUTTA YR LOOP)的表达式开头得到错误无效关键字。 Hese是我的代码。请帮忙。感谢。

I HAS A VARIABLE 
I HAS A ITERATOR ITZ 0
I HAS A TRUTH
IM IN YR LOOP UPPIN YR ITERATOR WILE DIFFRINT TRUTH AN "WIN"
    VISIBLE "GIMMEH NUMBR"
    GIMMEH VARIABLE
    VARIABLE IS NOW A NUMBR, O RLY?
        YA RLY
            I HAS A TRUTH ITZ "FAIL"
            GTFO
        NO WAI
            VISIBLE "HOW U FAIL SIMPL INSTUCTINS"
IM OUTTA YR LOOP

1 个答案:

答案 0 :(得分:0)

你在if语句的末尾缺少OIC

VARIABLE IS NOW A NUMBR, O RLY?
    YA RLY
        I HAS A TRUTH ITZ "FAIL"
        GTFO
    NO WAI
        VISIBLE "HOW U FAIL SIMPL INSTUCTINS"
OIC

请参阅:https://github.com/justinmeza/lolcode-spec/blob/master/v1.2/lolcode-spec-v1.2.md#if-then