Benjamin Scott wrote:
> int main (int argc, char **argv)
> ' Means That the program can accept parmeteres.
> ' May be old school, but as long as we have need
> ' of computer tool in a Command Prompt interface
> ' We have need of it.
' Wrong lanugage.
// Right language.
/* Right language? */
The old-school BASIC comments are a nice touch but won't compile.
> { 'Begins main Function, of course.
>
> while (argc) {
> 'While the number of parmeters are > 0 do this.
>
> printf ("%s\n", argv[argc-1] ); 'Print the Parmeter.
> argc--; ' Take 1 away from Argc.
>
> ' In short this program show one at a time all of the
> ' Parmeters that are give to it. NOTE: Every program
> ' receives atleast one parmenter: It name.
IIRC, this is not required to be true (but usually is the case).
> }
>
> return 0; 'REturn completed sucessfully.
> } 'End main function.
--
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197
*NEW* MyTaskFocus 1.1
Get on task. Stay on task.
http://www.CubicleSoft.com/MyTaskFocus/