-
Notifications
You must be signed in to change notification settings - Fork 1
feat: welcome message and string functions edits #70
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
Conversation
OH296
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made one point but probably outside of scope for pr
| //TODO almost all of this can be handled in the gui layer | ||
| try{ | ||
| scr_ui_manage(); | ||
| } catch(_exception){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general while messing around would be best to sling these in try_and_report_loop maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general while messing around would be best to sling these in
try_and_report_loopmaybe?
I think try/catch and handle_exception combo should do the same thing.
I've created handle_exception as a light version of try_and_report_loop, for cases where you don't need custom functions to run on catch. It's just more compact, but works mostly the same way, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess that's true, i suppose i was mostly just thinking that try_and_report_loop("ui Manage"), scr_ui_manage) is just less lines and coudl have as you say a custom catch function, but it's probably outside of scope for this pr
Done:
The welcome message:
Code:
string_plural.Functions:
handle_exceptioninto all (most?) catch. Should work like a light version of try_and_report.string_pluralnow supports a second argument - variable to check to decide whenever to convert a string to plural form or not.integer_to_letters- converts an integer to a string word. Supports 2 additional arguments - capitalize the first letter of the resulting word; output an ordinal form of the word.Notes:
TODO:
integer_to_lettersintointeger_to_word.