cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/05/06:00:44

From: "Martin Ambuhl" <mambuhl AT tiac DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc 2.7.2.1: Won't compile | or || symbols (really!)
Date: Sat, 5 Sep 1998 05:53:03 -0400
Organization: Nocturnal Aviation
Lines: 36
Message-ID: <6sr1e1$crc@news-central.tiac.net>
References: <35f08a2b DOT 895968 AT news DOT demon DOT co DOT uk>
NNTP-Posting-Host: p26.tc2.newyo.ny.tiac.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

richard AT wynne DOT demon DOT co DOT uk wrote in message
<35f08a2b DOT 895968 AT news DOT demon DOT co DOT uk>...
|Just installed gcc 2.7.2.1 (from djgpp distribution). Believe it or
|not, I can't get logical or bitwise OR (pipe symbol) to compile. Get
|message "parse error before character 0335", 335 being the (octal)
|ascii for the pipe character. For example, this won't compile:
|
|int main (int argc, char * argv[]) {
|  if((argc == 1) || (argc == 2)) {
|    return 1;
|  } else {
|    return o;
|  }
|}
|
|Nothing wrong with my PC (Win 95, UK English setup), and my pipes
|otherwise work fine.
|
|Can't contemplate coding without OR, so any ideas out there?
|
=========
Try this:

int main(int argc, char *argv[])
{
    if ((argc == 1) || (argc == 2)) {
        return 1;
    }
    else {
        return 0;               /* mha - replaced 'o' with '0' */
    }
}



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019