Re: [Vala] How do I access command line arguments from a main block?



You missed the vala-list in CC in your answer, so I will just repeat
myself.

By 'main block', I meant the experimental main block feature. I am well
aware of how arguments are accessed usually, but I would like to know
how it is done it this particular case.

Take this as an example of main block:

        https://github.com/valum-framework/valum/blob/master/examples/app/app.vala
      
Le vendredi 20 février 2015 à 22:51 -0600, David Lechner a écrit :
On 02/20/2015 09:41 PM, Guillaume Poirier-Morency wrote:
Simple question here!

How can I access the CLI arguments from a main block? Is there something
like a predefined variable?


Sure, just have a string[] argument.

public static int main (string[] args) {
     return 0;
}


-- 
Guillaume Poirier-Morency <guillaumepoiriermorency gmail com>

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]