12-12-2022, 08:37 AM
(12-12-2022, 06:54 AM)SMcNeill Wrote: It's not, but it's part of my KeyHit library. Works with custom keyboard layouts, and unicode printing, so it's great for people with non-American keyboards.Cleverly, it's also another example of telling off those people who want QB64(PE) to support a subprogram written by the user which is like "sprintf()" in C. Somehow take that function and come up with an all-BASIC version of it that replaces "PRINT USING" most of the time.
I wrote a function that randomly chooses an integer from a list. That function accepts one parameter which is a string, the contents of that string is a semicolon-separated list of values. It's because otherwise we cannot do like the extended "CHR$()" implementation in Freebasic. I have done that too and more, even one called "chrud$()" which returns an 8-character string out of a 16-digit _INTEGER64 hexadecimal value.
However, to get a password and to let the user know how important it is, a function like that "ExtendedInput$" isn't necessary. Just use "INPUT$(1)" to get each character, maybe allow only backspace and [ENTER], and don't print anything that was typed. The "sudo" password requester for many Linux distros is a bit permissive IMHO.