Re: main(int argc, char *argv[])



jmccloughlin@xxxxxxxxxxx (Sokar) wrote:

>I have my main function set up as
>
>int main(int argv, char *argv[])
>
>so taht i can read in a variable which is passed to the program on the
>command line. The problem is that main calls other functions and some
>of them need to start jump to the start of main.
^^^^
===SNIP===
>argv[1] is just used once as soon as main starts up and never used
>again after, so i dont mind if i loose the ability to read from it, i
>just need to be able to call main from another part of the program
^^^^

So which is it -- jump or call? If 'jump', there's setjmp/longjmp.

--
Dan Henry
.



Relevant Pages

  • Re: main(int argc, char *argv[])
    ... Sokar wrote: ... > I have my main function set up as ... > so taht i can read in a variable which is passed to the program on ... Recursively calling main is a bit funky. ...
    (comp.lang.c)
  • Re: main(int argc, char *argv[])
    ... Sokar wrote: ... > I have my main function set up as ... > so taht i can read in a variable which is passed to the program on the ...
    (comp.lang.c)
  • Re: main(int argc, char *argv[])
    ... >>I have my main function set up as ... Do we have any chainsaws in the house? ... Then how am I supposed to learn to juggle? ... Sokar has asked how to do something that is almost ...
    (comp.lang.c)
  • main(int argc, char *argv[])
    ... I have my main function set up as ... int main(int argv, char *argv) ... so taht i can read in a variable which is passed to the program on the ... just int mainthis would be no problem, ...
    (comp.lang.c)