On Mon, 4 Nov 2024 17:54:20 +0000, Seymour J Metz <sme...@gmu.edu> wrote:
>Free-form input to a program that I am writing. Each parameter statement has >either one or two labels, separated by blanks. I'm only concerned with EBCDDIC. > ... How long should an input buffer be? Suppose you're parsing left-to-right as you receive input? An erstwhile co-worker, a novice programmer was assigned to write a command processor for our product. He began by calculating the maximum valid command string for each command and storing that number in the symbol table for each command. If a user entered a command string exceeding such a length, the program issued an error message, "Option string too long." how should the user recover? Where is the error? Should the input buffer be large enough to issue a useful diagnostic? Use an output buffer long enough that there is no overrun risk. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN