Shell argv

JB sundown at pacifier.com
Mon May 8 13:36:32 EDT 2017


Hi Mark,

Thanks for the reply and info.

The file is actually named Hello and it is
a c program compiled with xcode.

It takes the argc value and if it is less than 2
returns a message a parameter was not added.
If it is 2 then it prints the value of argv[1] which
would be the first argument passed by the info
I give when opening the file.  After that no matter
what value argc is it prints the value of argv[0]
and that is always the name and path of the file.

The file executes properly and the message is printed
showing I did not enter any arguments even though I
did try to and then it prints the file name and path like
I told it to from argv[0].

JB
 




More information about the use-livecode mailing list