Enrico, This is NOT a bug, and it's 100% Clipper compatible. This can be corrected to work like this:
----------------------------------------------------------------------------- #command TEST <right: RIGHT> [<pad>]] ; [COLOR <nClrFore> [,<nClrBack>]] ; ; => Test( <.right.>, <pad>, <nClrFore>, <nClrBack> ) FUNCTION MAIN() TEST COLOR 1, 2 RIGHT 10 // first syntax TEST RIGHT 10 COLOR 1, 2 // second syntax RETURN NIL ----------------------------------------------------------------------------- The problem is the Clipper PP does NOT consider RESTRICTED MATCH MARKER a STOPPER when skipping over OPTIONAL input. I'm sorry that I don't have a more descriptive explanation as this is very technical. If you tried to develop a Clipper compatible Pre-Processor it would become crystal clear. Ron -------------------------------------------------- From: "Enrico Maria Giordano" <e.m.giord...@emagsoftware.it> Sent: Wednesday, July 14, 2010 2:02 AM To: "xHarbour Developers Mailing List" <xharbour-developers@lists.sourceforge.net> Subject: [xHarbour-developers] Preprocessor bug? > I'm not sure if I already asked this question in the past. Anyway, in the > following sample, why the second syntax is not accepted by the > preprocessor? > > #command TEST [<right: RIGHT> [<pad>]] ; > [COLOR <nClrFore> [,<nClrBack>]] ; > ; > => Test( <.right.>, <pad>, <nClrFore>, <nClrBack> ) > > > FUNCTION MAIN() > > TEST COLOR 1, 2 RIGHT 10 // first syntax > TEST RIGHT 10 COLOR 1, 2 // second syntax > > RETURN NIL > > EMG > > -- > EMAG Software Homepage: http://www.emagsoftware.it > The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum > The Best of Spectrum Games: http://www.emagsoftware.it/tbosg > The EMG Music page: http://www.emagsoftware.it/emgmusic > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > xHarbour-developers mailing list > xHarbour-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xharbour-developers > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers