20950709%VUVAXCOM.BITNET@pucc.princeton.edu (09/28/90)
I have run into an interesting little problem using standard input in VAX Pascal. The problem involves reading an End-Of-File from standard input (ie. [Control][Z]) and then trying to read another command from standard input. I realize that this goes against the definition of the EOF concept, but lots of users go against many more definitions. Consider the following code segment (assume all variable-type declarations are appropriate): If (Not(EOF)) Then Read (First-Try); . . . If (Not(EOF)) Then Read (Second-Try); The problem that I encounter is that if the user presses [Control][Z] when trying to read "First-Try", there doesn't appear to be any chance of getting to read "Second-Try". Is there some way of setting EOF back to FALSE again? Thanks for any help that you can provide to me. Have a good day, Jim.
merriman@ccavax.camb.com (09/28/90)
In article <24637@adm.BRL.MIL>, 20950709%VUVAXCOM.BITNET@pucc.princeton.edu writes: > I have run into an interesting little problem using standard input in > VAX Pascal. The problem involves reading an End-Of-File from standard input > (ie. [Control][Z]) and then trying to read another command from standard input. > I realize that this goes against the definition of the EOF concept, but lots of > users go against many more definitions. Consider the following code segment > (assume all variable-type declarations are appropriate): > > If (Not(EOF)) Then Read (First-Try); > . > . > . > If (Not(EOF)) Then Read (Second-Try); > > The problem that I encounter is that if the user presses [Control][Z] when > trying to read "First-Try", there doesn't appear to be any chance of getting to > read "Second-Try". Is there some way of setting EOF back to FALSE again? How about RESET?