On Mon, 12 May 2008, Szakáts Viktor wrote: Hi Viktor,
> Suppose there is a perfectly valid .prg > file, but instead of TAB or SPACE chars > for indenting, say we have Chr(160) chars > (looks like space in my editor). With some other codepages it can be sth else, f.e. national character. > In this case Harbour will compile the source without > a single error or warning, yet the resulting .c > file will virtually contain no code. Yes it is. Original Clipper behavior is covered by HB_C52_STRICT macro, see in hbpp.h: #ifdef HB_C52_STRICT # define HB_PP_ISILLEGAL(c) ( (c) < 32 || (c) >= 126 ) #else # define HB_PP_ISILLEGAL(c) ( (c) < 32 || (c) == 127 ) #endif Old PP alows to use other characters and people begins to use their national characters in #error/#stdout messages, etc. so I decided to keep it and only added the above macro. > CA-Cl*pper would throw tons of "Illegal char" > errors for the same .prg. I think Harbour should > do something similar to save the time looking > for a problem in a seemingly error-free source > file. If it's realy such big problem then we can force strictly compatible behavior by changing the above macro but in such case it will not be possible to make sth like: #error Wystąpił błąd > [ I'm experiencing this everytime I save a message > from this list containing some code (as .rtf from > OS X mail) and (using WordPad) I copy/paste the code > to a .prg. ] You will still have this problem. Only error message will be generated during compilation. I understand that it may help you to clean the source code but it will also forbid using national characters in some constructions just like in Clipper. In few cases it will be valid code, f.e. Clipper cannot preprocess this code and generates error messages: #command OUT <*x*> => qout( #<x> ) OUT BŁĄD I do not have any special preferences here. It should be group decision if we want to keep in PP support for national characters or not. best regards, Przemek _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
