Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparing between variables having a string is failed. #237

Closed
Kray-G opened this issue Mar 23, 2021 · 0 comments
Closed

Comparing between variables having a string is failed. #237

Kray-G opened this issue Mar 23, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Kray-G
Copy link
Owner

Kray-G commented Mar 23, 2021

Here is an example to be failed.

function gt(a, b)  { return a > b; }
function lt(a, b)  { return a < b; }
function ge(a, b)  { return a >= b; }
function le(a, b)  { return a <= b; }
function lge(a, b) { return a <=> b; } // will be successful.
try { gt("a", "b");  } catch (e) { System.println(e.what()); }
try { lt("a", "b");  } catch (e) { System.println(e.what()); }
try { ge("a", "b");  } catch (e) { System.println(e.what()); }
try { le("a", "b");  } catch (e) { System.println(e.what()); }
try { lge("a", "b"); } catch (e) { System.println(e.what()); } // nothing's displayed.

It is okay when comparing two strings directly.

System.println("a" > "b");
@Kray-G Kray-G added the bug Something isn't working label Mar 23, 2021
@Kray-G Kray-G self-assigned this Mar 23, 2021
@Kray-G Kray-G closed this as completed in 94c49ba Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant