Enrico,

This is because of the REVERSED order, if you want to support it you need a 
3rd rule:

//------------------------------------------------------------------------------//
#command TEST RIGHT [<pad>]                      ;
             [COLOR <nClrFore> [,<nClrBack>]]    ;
   => Test( .T., <pad>, <nClrFore>, <nClrBack> )

#command TEST [COLOR <nClrFore> [,<nClrBack>]] ;
   => Test( .F.  NIL, <nClrFore>, <nClrBack> )

#command TEST [COLOR <nClrFore> [,<nClrBack>]] ;
              RIGHT [<pad>]                    ;
   => Test( .T., <pad>, <nClrFore>, <nClrBack> )

FUNCTION MAIN()

    TEST COLOR 1, 2 RIGHT 10
    TEST RIGHT 10 COLOR 1, 2

    RETURN NIL
//------------------------------------------------------------------------------//

Ron

--------------------------------------------------
From: "Enrico Maria Giordano" <e.m.giord...@emagsoftware.it>
Sent: Friday, July 30, 2010 2:08 AM
To: "xHarbour Developers Mailing List" 
<xharbour-developers@lists.sourceforge.net>
Subject: Re: [xHarbour-developers] Preprocessor bug?

>> The workaround:
>>
>>    #command TEST RIGHT [<pad>]                                  ;
>>                         [COLOR <nClrFore> [,<nClrBack>]]          ;
>>       => Test( .T., <pad>, <nClrFore>, <nClrBack> )
>>
>>    #command TEST [COLOR <nClrFore> [,<nClrBack>]] ;
>>       => Test( .F.  NIL, <nClrFore>, <nClrBack> )
>
> I tried and got
>
> Error E0030  Syntax error: "syntax error at 'COLOR'"
>
> at line 11.
>
> This is my test:
>
> #command TEST RIGHT [<pad>]                                  ;
>                     [COLOR <nClrFore> [,<nClrBack>]]          ;
>   => Test( .T., <pad>, <nClrFore>, <nClrBack> )
>
> #command TEST [COLOR <nClrFore> [,<nClrBack>]] ;
>   => Test( .F.  NIL, <nClrFore>, <nClrBack> )
>
>
> FUNCTION MAIN()
>
>    TEST COLOR 1, 2 RIGHT 10
>    TEST RIGHT 10 COLOR 1, 2
>
>    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
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to