07-07-2023, 01:58 AM
In a QB64 version earlier than v3.5 this method of getting input from the user would work well. Otherwise users would expect a pretty window to do that. Could almost call upon "yad" or "zenity" on Linux but either one has to be installed, if not then it has to be done in the way prescribed in this thread.
Doesn't Windows have a way to display a dialog to receive input, at least like an "Input Box", or does it still have to be done with the API?
Another thing is that the user of this presented program has to cooperate. What if he/she made a mistake and needs to start over, or he/she entered something in the "wrong" field? INPUT is almost never used these days because of it, and LINE INPUT is almost relegated to text file input. Those two keywords and "scanf()" and "gets()" in C and whatever looked like them became obsolete the moment the few full-screen editors came out such as the QBasic editor.
This is to inform somebody who is getting acquainted with BASIC programming or with QB64, and understands that a program of this type could be for his/her own use only and knows how to do it right.
Doesn't Windows have a way to display a dialog to receive input, at least like an "Input Box", or does it still have to be done with the API?
Another thing is that the user of this presented program has to cooperate. What if he/she made a mistake and needs to start over, or he/she entered something in the "wrong" field? INPUT is almost never used these days because of it, and LINE INPUT is almost relegated to text file input. Those two keywords and "scanf()" and "gets()" in C and whatever looked like them became obsolete the moment the few full-screen editors came out such as the QBasic editor.
This is to inform somebody who is getting acquainted with BASIC programming or with QB64, and understands that a program of this type could be for his/her own use only and knows how to do it right.