home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / tcl_main.z / tcl_main
Encoding:
Text File  |  1998-10-30  |  3.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. TTTTccccllll____MMMMaaaaiiiinnnn((((3333TTTTccccllll))))                                                  TTTTccccllll____MMMMaaaaiiiinnnn((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tcl_Main - main program for Tcl-based applications
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttccccllll....hhhh>>>>
  13.  
  14.      TTTTccccllll____MMMMaaaaiiiinnnn(_a_r_g_c, _a_r_g_v, _a_p_p_I_n_i_t_P_r_o_c)
  15.  
  16. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  17.      int               _a_r_g_c           (in)      Number of elements in _a_r_g_v.
  18.  
  19.      char              *_a_r_g_v[]        (in)      Array of strings containing
  20.                                                 command-line arguments.
  21.  
  22.      Tcl_AppInitProc   *_a_p_p_I_n_i_t_P_r_o_c   (in)      Address of an application-
  23.                                                 specific initialization
  24.                                                 procedure.  The value for this
  25.                                                 argument is usually
  26.                                                 TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
  27.  
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      TTTTccccllll____MMMMaaaaiiiinnnn acts as the main program for most Tcl-based applications.
  31.      Starting with Tcl 7.4 it is not called mmmmaaaaiiiinnnn anymore because it is part of
  32.      the Tcl library and having a function mmmmaaaaiiiinnnn in a library (particularly a
  33.      shared library) causes problems on many systems.  Having mmmmaaaaiiiinnnn in the Tcl
  34.      library would also make it hard to use Tcl in C++ programs, since C++
  35.      programs must have special C++ mmmmaaaaiiiinnnn functions.
  36.  
  37.      Normally each application contains a small mmmmaaaaiiiinnnn function that does
  38.      nothing but invoke TTTTccccllll____MMMMaaaaiiiinnnn.  TTTTccccllll____MMMMaaaaiiiinnnn then does all the work of creating
  39.      and running a ttttccccllllsssshhhh-like application.
  40.  
  41.      When it is has finished its own initialization, but before it processes
  42.      commands, TTTTccccllll____MMMMaaaaiiiinnnn calls the procedure given by the _a_p_p_I_n_i_t_P_r_o_c argument.
  43.      This procedure provides a ``hook'' for the application to perform its own
  44.      initialization, such as defining application-specific commands.  The
  45.      procedure must have an interface that matches the type TTTTccccllll____AAAAppppppppIIIInnnniiiittttPPPPrrrroooocccc:
  46.           typedef int Tcl_AppInitProc(Tcl_Interp *_i_n_t_e_r_p);
  47.      _A_p_p_I_n_i_t_P_r_o_c is almost always a pointer to TTTTccccllll____AAAAppppppppIIIInnnniiiitttt; for more details
  48.      on this procedure, see the documentation for TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
  49.  
  50.  
  51. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  52.      application-specific initialization, command-line arguments, main program
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.