Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
#command optional parameter
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Enrico Maria Giordano  
View profile  
 More options Feb 2, 10:31 am
Newsgroups: comp.lang.xharbour
From: "Enrico Maria Giordano" <e.m.giord...@emagsoftware.it>
Date: Thu, 2 Feb 2012 16:31:11 +0100
Local: Thurs, Feb 2 2012 10:31 am
Subject: #command optional parameter
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saulius  
View profile  
 More options Feb 5, 7:25 am
Newsgroups: comp.lang.xharbour
From: "Saulius" <labi...@gmail.com>
Date: Sun, 5 Feb 2012 14:25:43 +0200
Local: Sun, Feb 5 2012 7:25 am
Subject: Re: #command optional parameter
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Enrico Maria Giordano  
View profile  
 More options Feb 5, 2:42 pm
Newsgroups: comp.lang.xharbour
From: "Enrico Maria Giordano" <e.m.giord...@emagsoftware.it>
Date: Sun, 5 Feb 2012 20:42:34 +0100
Local: Sun, Feb 5 2012 2:42 pm
Subject: Re: #command optional parameter

Thank you Saulius, I will study it!

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »