Tutorialaa-batch




Prev | Up | Next | Back | Forward | Online Documentation Home Page

SYNOPSIS

       aa-batch [ -save ] [ options ] script-name filelist ...

       aa-batch -pass_args [ options ] script-name args ...

       aa-batch  -pass_filename  [ options ] script-name filelist
       ...


DESCRIPTION

       aa-batch uses Ada-ASSURED in batch mode to evaluate script
       file script-name and then does one of the following:

       If the -pass_args flag is present, then aa-batch invokes a
       scheme function with a list containing  the  rest  of  the
       arguments  as a parameter.  The scheme function invoked is
       specified with the -start flag, and  defaults  to  "main".
       This function takes one parameter that is a list.

       If  the  -pass_filename  flag  is  present,  then aa-batch
       invokes a scheme function on each file  in  filelist,  and
       then exits.  The scheme function invoked is specified with
       the -start flag, and defaults to  "main".   This  function
       takes   one  parameter  that  is  a  file  name.   If  the
       -pass_args flag is also set, then this option  does  noth-
       ing.

       If  neither  flag  is  present,  then  for  each  file  in
       filelist, aa-batch first opens the file,  then  invokes  a
       scheme  function,  and then closes the file.  If the -save
       flag is set, then the file is saved before it  is  closed.
       The  scheme  function invoked is specified with the -start
       flag, and defaults to  "main".   This  function  takes  no
       parameters.

       Operation   of  aa-batch  requires  an  Ada-ASSURED  batch
       license.  aa-batch will fail if script-name is not  speci-
       fied or cannot be opened.  All error messages from script-
       name are sent to standard error.


OPTIONS

       -backup
              Create a backup file for each file processed.   For
              file  filename, a backup file entitled filename.bak
              is  created.   This  option  is  ignored   if   the
              -pass_args flag is set.

       -language 83 | 95
              Use  the  specified  choice  for  the  Ada language
              instead of the default.

       -save  Save the file after the start  function  is  called
              but  before the file is closed. This option is only

       -xrm string
              Pass the given X resource string string to the edi-
              tor (X Windows only).


EXAMPLES

       aa-batch exec-stats.stk xyz.a
              evaluates  the  scheme  file  exec-stats.stk,   and
              invokes:
              (sg:open "xyz.a" "compilation" "No")
              (main)
              (sg:close)
              (sg:exit)

       aa-batch   -start  ch:start  -save  consistent_headers.stk
       xyz.a
              evaluates  the  scheme file consistent_headers.stk,
              and invokes:
              (sg:open "xyz.a" "compilation" "No")
              (ch:start)
              (sg:save)
              (sg:close)
              (sg:exit)

       aa-batch -pass_filename -start mycount count.stk f1.a f2.a
              evaluates the scheme file count.stk, and invokes:
              (mycount "f1.a")
              (mycount "f2.a")
              (sg:exit)

       aa-batch -pass_args -start run test.stk -myoption1  -myop-
       tion2
              evaluates the scheme file test.stk, and invokes:
              (run (list "-myoption1" "-myoption2"))


RETURN VALUES

       aa-batch returns 0 on success, 1 on failure. aa-batch will
              return 0 even  if  there  is  an  error  evaluating
              script script-name.


SEE ALSO

       aa(1).

       Ada-ASSURED User Guide & Reference Manual
       Ada-ASSURED Batch Processing Module Guide
       Part  No. AA-RM-3.5, GrammaTech, Inc.,  317 N. Aurora St.,
       Ithaca, NY 14850.
       Tel: +1 607 273 7340
       Fax: +1 607 273 8752
       Email: admin@grammatech.com
               support@grammatech.com


COPYRIGHT




Forward