Skip to content
Snippets Groups Projects
Commit 96f066f6 authored by marivil's avatar marivil
Browse files

Funciona mcd

parent 1a53c789
No related branches found
No related tags found
1 merge request!1Arbol
...@@ -320,20 +320,20 @@ static void proc(ast_t *root) ...@@ -320,20 +320,20 @@ static void proc(ast_t *root)
{ {
if (right(left(root)) != NULL) if (right(left(root)) != NULL)
{ {
proc(right(left(root))); evaluate(right(left(root)));
} }
cond = expr(left(left(root))); cond = expr(left(left(root)));
} }
} }
else else
{ //DO-WHILE { //DO-WHILE
proc(right(right(root))); evaluate(right(right(root)));
cond = expr(left(right(root))); cond = expr(left(right(root)));
while (cond != 0.0) while (cond != 0.0)
{ {
if (right(right(root)) != NULL) if (right(right(root)) != NULL)
{ {
proc(right(right(root))); evaluate(right(right(root)));
} }
cond = expr(left(right(root))); cond = expr(left(right(root)));
} }
......
...@@ -84,7 +84,7 @@ WSPCS ({WSPC}+) ...@@ -84,7 +84,7 @@ WSPCS ({WSPC}+)
FLOAT ({FLOAT1}|{FLOAT2}|{FLOAT3}) FLOAT ({FLOAT1}|{FLOAT2}|{FLOAT3})
OP1 ([-+/*=<>?:()!^\{\}]) OP1 ([-+/*=<>?:()!^\{\},])
OP2 ("=="|"!="|"<="|">="|"&&"|"||") OP2 ("=="|"!="|"<="|">="|"&&"|"||")
STRSTART (["]) STRSTART (["])
......
//(10 < 11); //(10 < 11);
//? print("Hola"); : print("Adios"); //? print("Hola"); : print("Adios");
print(10 < 11); print(10 < 11);
if (10 < 11) while (10 < 11)
{ {
print("hola"); print(mcd(10, 20));
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment