next up previous contents index
Next: Why does the Undo Up: FAQ Previous: FAQ

How can I apply a script to a full forlib ?

By default, the script is applied to the current fortran unit. An experimental functionnality is being developped to go through all the tests.

  SCRIPT test ()
  // Initialize the list of units
  foo:=$forlib.INITALLUNITS($cunit)
  // Get the number of units
  nbunit := $forlib.NBUNIT 
  cpt:=0 
  WHILE(cpt<nbunit)
    // Get the unit AST of rank 'cpt'
    unit := $forlib.FINDUNIT(cpt)
    IF (unit) THEN
      // ### Insert your code here. 
      // ### Example:
      PRINT "FILE="+unit.FILENAME
    ENDIF 
    cpt:=cpt+1
  ENDWHILE)
ENDSCRIPT

You must follow the following rules so that your script works:



Yann Mevel
1999-04-30