Xref: utzoo misc.misc:5931 comp.misc:5945 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!indri!aplcen!arrom From: arrom@aplcen.apl.jhu.edu (Ken Arromdee) Newsgroups: misc.misc,comp.misc Subject: Re: The "evil" GOTO (Was: 25 Years of BASIC) Keywords: Guinness, phlegm, mackerel, intestines Message-ID: <1191@aplcen.apl.jhu.edu> Date: 5 May 89 05:47:31 GMT References: <1791@ubu.warwick.UUCP> <1436@onion.reading.ac.uk> <1814@ubu.warwick.UUCP> <11136@bloom-beacon.MIT.EDU> Reply-To: arrom@aplcen.apl.jhu.edu (Ken Arromdee (600.429)) Followup-To: misc.misc Organization: Johns Hopkins University Lines: 39 >> printf ("Enter your sex: "); >> while (sex != "m" && sex != "f") { >> gets (sex); >> if (sex != "m" && sex != "f") >> printf (" or only: "); >> } >do { > fprintf(stdout, "Enter your sex ( or only): "); > fflush(stdout); > fgets(stdin, sex, 2); > fflush(stdin); >} while ((*sex != 'm') && (*sex != 'f')); This is not analogous. The original example prints the " or only:" message only if the input is not an "m" or "f". This supposeedly analogous program prints it every time. I _know_ I can change the > but beating inews this way _feels_ better... -- "Do you know what this is????" "No, what?" "I don't know either..." -- Who said it, what story? Kenneth Arromdee (UUCP: ....!jhunix!ins_akaa; BITNET: g49i0188@jhuvm; INTERNET: arromdee@crabcake.cs.jhu.edu) (please, no mail to arrom@aplcen)