` Printed Icetips Article

Icetips Article



Par2: Template to print app tree
2000-04-12 -- Roberto Artigas Jr.
 
#!--------------------------------------------------------------------
#!--------------------------------------------------------------------
#!--------------------------------------------------------------------
#UTILITY(PrintProcTree,'Print Procedure Tree')
#!--------------------------------------------------------------------
#! Note:        Does NOT handle Procedure Recursion
#! Created By:  ?
#!
#ATSTART
#ENDAT
#!--------------------------------------------------------------------
#ATEND
#ENDAT
#!--------------------------------------------------------------------
#TAB ('Print Procedure Tree')
#PROMPT('Print AppProc.Txt after it is
generated',CHECK),%PrintQET,DEFAULT(1),AT(10)
#PROMPT('View AppProc.Txt after generation',CHECK),%Viewit,DEFAULT(1),AT(10)
#ENABLE(%PRINTQET=1)
#ENABLE(%VIEWIT <> 1)
#PROMPT('Delete AppProc.Txt After Printing',Check),%KillFile,AT(10)
#ENDENABLE
#ENDENABLE
#ENDTAB
#DISPLAY('Click OK to create AppProc.Txt')
#CREATE('AppProc.Txt')
#MESSAGE('Creating AppProc.Txt',2)

Print Procedure Tree
======================================
(PROGRAMMER INTERNAL USE ONLY)
======================================
======================================

Program:        %Application
Dictionary:     %DictionaryFile

#INSERT(%DisplayTree,%FirstProcedure,'',' ')

Global Variables
======================================
#FOR(%GlobalData)
%[25]GlobalData %GlobalDataStatement
#ENDFOR
======================================
======================================

#CLOSE('AppProc.Txt')
#IF(%PRINTQET=1)
#PRINT('AppProc.Txt','Procedure Names')
#ENDIF

#IF(%Viewit=1)
#RUN('Write AppProc.Txt')
#ENDIF

#IF(%KillFile=1)
#REMOVE('AppProc.Txt')
#ENDIF
#!
#GROUP(%DisplayTree,%ThisProc,%Level,%NextIndent)
#FIX(%Procedure,%ThisProc)
%Level+-%ThisProc (%ProcedureTemplate) %ProcedureDescription
#FOR(%ProcedureCalled)
  #IF(INSTANCE(%ProcedureCalled)=ITEMS(%ProcedureCalled))
#INSERT(%DisplayTree,%ProcedureCalled,%Level&%NextIndent,' ')
  #ELSE
#INSERT(%DisplayTree,%ProcedureCalled,%Level&%NextIndent,'|')
  #ENDIF
#ENDFOR
#!



Printed May 6, 2024, 5:02 am
This article has been viewed/printed 35117 times.