谁能解释一下为什么这个该死的 if/else 代码不起作用?

use*_*834 3 if-statement brainfuck

// if x = y then {if_code}; else then {else_code}

,>,< / empty memory

[->-<]> / (x)'y

[>->]< / 0'(y-x)

+[
  {if_code}
  ->>
]< / {if x=y then} (0)'0; {else then} 0'y-x'(1)

[
  {else_code}
  [-]
]< / 0'(y-x)

/ empty memory
Run Code Online (Sandbox Code Playgroud)

/是显示内存应该是什么样子,'是分隔内存中的值,()用来显示指针在哪里,//是注释,{}是描述

每当我尝试运行它时,无论我输入什么,if_code 和 else_code 都会运行。

小智 5

您的“注释”中至少隐藏了三个“-”命令。