Mail Archives: djgpp/1999/10/26/14:16:15
On 26 Oct 99, Sakis DOT Platsas AT lake DOT ie was found to have commented thusly:
> I am using djgpp 2.02 inside the Win98 GUI from a command prompt.
> Most programs I tried until now worked perfectly, as expected :)
> BUT...
> When a line in the code reads something like this:
>
> ... if ((string[i] == ' ') || ....)
>
> I get a "parse error ... char 0335" (presumably that's the "|" character)
Actually it's not. Octal 0335 is decimal 221 which is hexadecimal DD. That
character is outside the ASCII character set. The character you want is Octal
0174 or decimal 124 or hexadecimal 0x7c.
You might be confused by the appearance of certain glyphs in this or that
character set. Check out your keyboard configuration and verify that this or
that key produces the proper character of the ASCII set.
> whereas, if I substitute || with &&:
>
> ... if ((string[i] == ' ') && ....)
>
> the code works OK. It seems that the "logical OR" operator is mishandled somehow
> in this environment.
> Actually, when using RHIDE, the "&&" string was correctly identified as a
> "reserved" symbol, being in while foreground. However, the "||" string is shown
> with a YELLOW foreground, which means it's NOT considered as a reserved symbol.
>
> Any ideas? Tried the FAQ, the list archives - zilch. I suspect it's some kind of
> misinterpretation of the character "|" in my context, but I can't see the reason
> myself.
Yes, that is probably the case. Check your keyboard config, press keys, test
for the codes they produce, and you'll probably not have compilation problems.
> Thanks in advance
Mitch Halloran
Research (Bio)chemist
Duzen Laboratories Group
Ankara TURKEY
- Raw text -