brainfuck/op.bf

79 lines
1.1 KiB
Brainfuck

COMPAR :
========
<[
>[->+>+<<]>>[-<<+>>] on copie
+<[>-<[-]] on teste
>[->+>+<<]>>[-<<+>>]
<[<<<<[-]+>+>>>-] si le test est valide on efface
<<<-<-on finit la boucle
]
{add the last part}
Situation à la fin:
0 b 0 k
EQUALS :
+>[<->[-]]>>[<<<->>>-]<<<
DIFFERENT :
>[<+>[-]]>>[<<<+>>>-]<<<
GREATER :
>[-]>>[<<<+>>>-]<<<
GREATER OR EQUALS :
+>[<->[-]]>>[-]<<<
SMALLER :
>[<+>[-]]>>[-]<<<
SMALLER OR EQUALS :
+>[-]>>[<<<->>>-]<<<
MUL :
=====
<[->>+<<]>[->[-<<+>>>+<]>[-<+>]<<]>[-]<<
DIV :
=====
[->+>>+<<<]
<[->+>>+<<<]
>>>
[>[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[->+>+<<]>>[-<<+>>]<[<<<<[-]+>+>>>-]<<<-<-]+>[<->[-]]>>[-]<<<
[
-<[-<->>+<]>[-<+>]
<<<+>
[->>+>+<<<]>>>[-<<<+>>>]<<
[->>+>+<<<]>>>[-<<<+>>>]<
<[>[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[->+>+<<]>>[-<<+>>]<[<<<<[-]+>+>>>-]<<<-<-]+>[<->[-]]>>[-]<<<
]
<[-]<[-]<
MOD :
=====
[->+>>+<<<]
<[->+>>+<<<]
>>>
[>[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[->+>+<<]>>[-<<+>>]<[<<<<[-]+>+>>>-]<<<-<-]+>[<->[-]]>>[-]<<<
[
-<[-<->>+<]>[-<+>]
<<
[->>+>+<<<]>>>[-<<<+>>>]<<
[->>+>+<<<]>>>[-<<<+>>>]<
<[>[->+>+<<]>>[-<<+>>]+<[>-<[-]]>[->+>+<<]>>[-<<+>>]<[<<<<[-]+>+>>>-]<<<-<-]+>[<->[-]]>>[-]<<<
]
<[-]<[-<+>]<