Next: main include, Previous: main shell-parser, Up: Generated main [Contents][Index]
You must supply a value for the main-text attribute.
You may also supply a value for
option-code. If you do, then the optionProcess invocation
will not be emitted into the code. AutoOpts will wrap the main-text
inside of:
int
main( int argc, char** argv )
{
int res = <<success-exit-code>>;
{ // replaced by option-code, if that exists
int ct = optionProcess( &<<prog-name>>Options, argc, argv);
argc -= ct;
argv += ct;
}
<<main-text>>
return res;
}
so you can most conveniently set the value with a here string
(see here-string):
code = <<- _EndOfMainProc_ <<your text goes here>> _EndOfMainProc_;