For so many years I have wished that you could do this...
The '@' symbol stands for my wish. Pick your favourite and least confusing thingy to put there. You would see on the screen...
Where the '_' is the cursor. If you entered nothing and just hit return, then filnam$ would = "c:\data\default.dat". Importantly, you could use the already existing input editing functionality to modify the old value. Think of this as pre-stuffing the INPUT line with keystrokes supplied by a string (like a$). This should be dead simple. It would obviously be up to the programmer to provide an appropriate 'pre-stuff' string for the data type(s) of the variable(s) they want the user to input.
The purpose of this proposal is to improve and simplify the 30 minute, no frills, 'can you hack me out something to do this...' type of program. It spoils the eloquence, compactness, simplicity and size of a 'quick and dirty' to always have to sub out for something so absolutely fundamental as an editable, defaulted value user input. The jerk who originally made the INPUT statement did something as bad as car with no filler on the gas tank, as far as I'm concerned. Should we really have had Doskey? Command.com has always been lacking. Many 'other' shells have been born to address just that alone, by building it in. I think that INPUT pre-stuffing merits being built in, and should always have been. It takes too big a chunk of code to fully re-invent all the functionality of INPUT, just to get this one most needed little improvement.
How about this...
I think that the value added here would greatly improve the 'quick and dirties' in my life, from both a coding concience and a user=happy (often me) perspective.
So in the words of Roger Rabbit,
P bbbbbbbbbllleeeeez?
... well ok, now I'm done whining I can wait for the next update
------------------
What can go wrong will go wrong.
Anything can go wrong.
What hasn't?!?!
Code:
... filnam$="" a$="c:\data\default.dat" INPUT @ "Please enter datafile name > ", a$, filnam$ ...
Code:
Please enter datafile name > c:\data\default.dat_
The purpose of this proposal is to improve and simplify the 30 minute, no frills, 'can you hack me out something to do this...' type of program. It spoils the eloquence, compactness, simplicity and size of a 'quick and dirty' to always have to sub out for something so absolutely fundamental as an editable, defaulted value user input. The jerk who originally made the INPUT statement did something as bad as car with no filler on the gas tank, as far as I'm concerned. Should we really have had Doskey? Command.com has always been lacking. Many 'other' shells have been born to address just that alone, by building it in. I think that INPUT pre-stuffing merits being built in, and should always have been. It takes too big a chunk of code to fully re-invent all the functionality of INPUT, just to get this one most needed little improvement.
How about this...
Code:
... rem unam$ & filnam$ are read here from a prior settings file ... rem default inputs with own pre-defined target strings INPUT @ "Edit the datafile name > ", filnam$, filnam$ INPUT @ "Is your name correct? > ", unam$, unam$ ...
So in the words of Roger Rabbit,
P bbbbbbbbbllleeeeez?
... well ok, now I'm done whining I can wait for the next update

------------------
What can go wrong will go wrong.
Anything can go wrong.
What hasn't?!?!
Comment