fixed if conditionals.
This commit is contained in:
parent
b65d8d4396
commit
4f616021f3
3
__if.cpp
3
__if.cpp
@ -24,7 +24,8 @@ namespace jet {
|
||||
(type != "gt") &&
|
||||
(type != "ge"))
|
||||
throw coreutils::Exception("type value must be 'eq','ne','lt','le','gt','ge'.");
|
||||
int rc = keywords[resolveKeyword("value1")].compare(keywords[resolveKeyword("value2")]);
|
||||
int rc = resolveKeyword("value1").compare(resolveKeyword("value2"));
|
||||
std::cout << "if: " << resolveKeyword("value1") << " " << type << " " << resolveKeyword("value2") << ":" << rc << std::endl;
|
||||
if(((type == "eq") && (rc == 0)) ||
|
||||
((type == "ne") && (rc != 0)) ||
|
||||
((type == "lt") && (rc == -1)) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user