On Tue, 13 May 2008, Szakáts Viktor wrote: Hi Viktor,
> >>What is IMHO wrong. In such case you have situation like the one > >you wanted to avoid but it happens only in Clipper not in Harbour. > >In summary current Harbour behavior for me is much more cleaner. > Let's take this simple code: > -- > FUNC Main() > <ASCII- 20>QOut( "0" )<CRLF> > <ASCII-160>QOut( "1" )<CRLF> > <ASCII- 20>QOut( "2" )<CRLF> > -- > 'harbour /n' output: > Lines 3, Functions/Procedures 1 > ... Done. This is a bug in compiler. It silently stops farther processing when it founds nonterminal symbol at the beginning of line. It has nothing to PP but course it has to be fixed. Thanks for the example. I'll fix it ASAP. > So, what I fail to see is what this issue have to > do with preprocessor. There is nothing in the source > which would involve any PP logic, so I would think > it's passed to the compiler. Now the compiler finds > such a character which cannot be used in normal code, > and for byte zero it reports an error, for byte 160, > it reports nothing, and silently won't generate _any_ > code after processing line 2. This is not right IMO, > users should be at least warned that their source code > is not getting compiled for whatever reason. (it also > reports 3 processed line, while in reality only > one was processed and compiled.) See above. > The other question is if Harbour can report an illegal > char for zero byte, why can't it report one for > ASCII-160? Both are illegal in that context. See above. Illegal characters are reported by PP and by default ASCII-160 is not illegal character. See the macro I was talking about. > To make it even more interesting ASCII-1 will generated > both an illegal char and a syntax error in Harbour > (and only illegal char in Clipper). In Clipper ASCII-0 stops farther line processing. Just simply Clipper cannot properly process .prg code with embedded ASCII-0 characters. All other characters less then ASCII-32 are illegal. In Clipper also characters greater then ASCII-125 are illegal too. In Harbour it's intentionally disabled as long as HB_C52_STRICT macro is not defined. Please note that '~' ASCII-126 is also illegal character in Clipper. It means that we have one character which we can use for some extensions and for which we can freely define any behavior without breaking Clipper compatibility. In the future I will want to use it for strong type casting or bit operators. best regards, Przemek _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
