title: function declaration in pro*C without body
body: <blockquote>
    <p>Based on the comments i ve changed the subject to pro<em>c code and i
    withdraw the claim that it is C++ syntax. Keeping the tags same; as i
    still hope it is similar to c++ and no Pro</em>C tag available please bear
    with it.</p>
  </blockquote>
  
  <p>I suppose its a very new bee question. But as i have no ample time to learn C++ documentation i would appreciate if i can get help on this.</p>
  
  <p>I am working on converting pro*C code which resembles C++ syntax.</p>
  
  <p>Here is the code snippet</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;prg_codes.h&gt;
  #include &lt;prg_defines.h&gt;
  
  typedef struct
  {
     int errorflag;
     int slot;
  } option_info;
  
  
  int calc_options(currArgc,currArgv,options)
  int currArgc;
  char *currArgv[];
  option_info *options;
  {   
     int optChar;
     int invopt=0;
   while ((optChar = getopt(currArgc, currArgv, ":s:")) != -1 &amp;&amp; !(invopt))
    {}
     /* other commands */
  
  }  
  
  
  void  main(int argc, char *argv[])
  {
  
      option_info options;     
      int rc = 0;
      rc=calc_options(argc,argv,&amp;options);
      /* other commands */
  
  }
  </code></pre>
  
  <p>My question is </p>
  
  <p><code>option_info</code> is defined as a struct then as a function and called from main. Is it fine? how does it work?</p>
  
  <p>Is <code>option_info</code> inside the function <code>calc_options</code>. Because option_info seems using the parameters defined in calc_options.</p>
  
  <p>Or <code>calc_options</code> body is written somewhere else in any other file in the include section ?</p>