Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

#command optional parameter

10 views
Skip to first unread message

Enrico Maria Giordano

unread,
Feb 2, 2012, 10:31:11 AM2/2/12
to
Dear friends, in the following sample I would want to specify the OPTION
clause using a logical value (something like the remmed line):

#command TEST [<lOption: OPTION>] => Test( <.lOption.> )


FUNCTION MAIN()

LOCAL lVal := .T.

TEST

TEST OPTION

// TEST lVal

INKEY( 0 )

RETURN NIL


STATIC FUNCTION TEST( lOption )

? lOption

RETURN NIL

Is there a way to do it?

Thank you in advance.

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


Saulius

unread,
Feb 5, 2012, 7:25:43 AM2/5/12
to
Dear EMG,

Not nice, but works:)

#command TEST [<lOption: OPTION>] [<lOption2>] => Testas( [<.lOption.>]
[<lOption2>] )
#command TEST => Testas( .F. )

Test() -> Testas() - to avoid circularity

TEST //Testas( .F. )

TEST OPTION //Testas( .T. )

TEST lVal //Testas( lVal )

TEST OPTION lVal //Testas( .T. lVal ) --- ERROR

Best regards,
Saulius


Enrico Maria Giordano

unread,
Feb 5, 2012, 2:42:34 PM2/5/12
to
Thank you Saulius, I will study it!
0 new messages