Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!sri-unix!hplabs!decwrl!nsc!nsta!instable!amos From: amos@instable.UUCP Newsgroups: comp.lang.c Subject: Re: Help needed with and strings. Message-ID: <725@instable.UUCP> Date: Fri, 27-Mar-87 05:29:15 EST Article-I.D.: instable.725 Posted: Fri Mar 27 05:29:15 1987 Date-Received: Sat, 28-Mar-87 14:08:59 EST References: <5902@brl-adm.ARPA> Reply-To: amos%nsta@nsc.com (Amos Shapir) Distribution: world Organization: National Semiconductor (Israel) Ltd. Lines: 24 Hdate: 26 Adar 5747 In article <5902@brl-adm.ARPA> V053MDHL%UBVMS.BITNET@wiscvm.wisc.edu writes: > ... I am working on a Digital VAX ... This is not enough, there are at least 6 different O.S. on vaxen; I suspect however that 'fgets' should behave the sames way on all. > [1] The function returns a pointer to the first character in > the string. It was my belief that the pointer should point to the > last <\0> character, as I already know where the string begins. This is done so you can do things like strcmp("END", fgets(...)) > [2] In scanning the string for characters, I can compare with neither > "\n" or "\0", as neither of these characters, while actually pre- > sent in the strings, registers when compared. What do you mean 'does not register when compared'? How are the comparisons done? are you comparing to '\n' or '\0' (notice the *single* quotes)? -- Amos Shapir National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel. (972)52-522261 amos%nsta@nsc.com {hplabs,pyramid,sun,decwrl} 34.48'E 32.10'N