Skip to content

Conversation

@anderoonies
Copy link
Contributor

When prompting with readInt, readFloat, or readBoolean, correctly re-prompt the user with the output from the failing prompt

Summary

Input re-prompts weren't including the latest incorrect input in the prompt. This fixes that, as well as simplifying how readNumber works.
readLine behaves separately, since it doesn't have a parseFn, so I'm just duplicating the behavior of printing the prompt then output there.

Changes:

  • expose print and println in windowbinding entrypoint
  • properly include failed prompt in output

Screenshots of the change:

image

Checklist

  • npm test passes
  • Unit tests are included / updated
  • Documentation has been updated where relevant

…prompt the user with the output from the failing prompt
@anderoonies anderoonies changed the title Fixes for input re-prompting. Fixes for input re-prompting. Jan 27, 2022
@anderoonies anderoonies changed the title Fixes for input re-prompting. Fixes for input re-prompting Jan 27, 2022
@anderoonies anderoonies merged commit f5dd8b8 into codehs:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant