Last active
February 22, 2018 15:59
-
-
Save Vindaar/fcf313f9f68491b505733bbd5bea562e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc get_password(): string = | |
echo "Enter password: " | |
result = "" | |
var ch = getch() | |
while ch != '\r': | |
result &= $ch | |
ch = getch() | |
when isMainModule: | |
let password = get_password() | |
echo "Entered password was ", password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment