| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | EOF(2) |
FT>> I've been trying my hand at Exercise 1-6 in K&R with VC4: FT>> int main(void) /* verify that getchar() != EOF is 0 or 1 */ AR> ... DM> Depending on your platform, either Ctrl-Z or Ctrl-D is your EOF DM> character... the former for DOS, Win32, OS/2, and the latter for DM> unix-variants. (Warning: you can change the EOF character on DM> unix-variants, so it may be different...) AR> And the return value of getchar() and similar functions AR> is not that ^Z or ^D ascii value anyway. AFAIK, IIRC, AR> YMMV etc ;-) The point was that he was typing the wrong character to get the EOF... :-) ---* Origin: Tanktalus' Tower BBS (1:250/102) SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728 SEEN-BY: 639/252 670/213 218 @PATH: 250/102 201 99 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.