Universal Synaptics Example
Program
The following Fungus program has approximately the same
functionality
as a popular
CASE-BASED diagnostic tool used by several major companies and the
DOD.
The cost of this other program runs into six figures and is
difficult
and expensive to
setup and maintain.
As you can see, the Fungus code to accomplish nearly the same task
as the more expensive
program, is compact, easy to understand and adapts to changes
easily.
!DEBRIEF.JOB 4-3-99
CLEAR
ECHO/OFF
WINDOW/1/1/23/79/63/2/0/0
WINDOW/TITLE/1/'DeBrief'
LET DATAFILE = DIR${*.DDB}
IF ITEMS{DATAFILE|} = 0 THEN PRINT/'No data
file
found' PAUSE : GOTO ENDDEBRIEF
IF ITEMS{DATAFILE|} > 1 THEN
ASK/DATAFILE/'Select
a data file'/PAR{DATAFILE|}
!DEBRIEF_MENU:
ASKTEXT/AUTO_TASK/'Main_Menu'/COLOR(31)/BAR(112)/ROW(2)/TITLE(1)DeBrief/TITLE(5)`TEST_NAME|/HILITE(23)
!------------ Test generation options
--------------------
EXTRACT_DATA ! Enter Pilots complaint and
retrieve
a fix.
ENTER_DATA ! Add new repair information to
the
data base.
!------------ Test organizing options
--------------------
EDIT ! View the last report.
!------------ Exit Program
-------------------------------
EXIT ! Takes you back to the Main menu.
ENDASKTEXT
IF AUTO_TASK = EXTRACT_DATA THEN
- ASK/VERBS/' Enter the pilots debrief
verbage
'
- IF VERBS = "" OR VERBS = ESCAPE OR
VERBS = EXIT THEN GOTO ENDDEBRIEF
- LET SEARCH = TAG:'Select search items in
order
of importance'{VERBS|}
- IF SEARCH = "" THEN GOTO ENDDEBRIEF
- CLEAR
- SIFT/DATAFILE|/AND/1/300/PAR{SEARCH|} !all
words
match
- IF #1| = 0 THEN
- SIFT/DATAFILE|/OR/1/300/PAR{SEARCH|} !any
words
match
- ENDIF
- NSORT/FORCE,REPORT,IMBED,FILTER/RANGE:1..3{SEARCH|}
!3 words enough
- LOOP/1/#1|
WRITE/LCASE{M$:81{LINE{K|}}}/K|/81
!enhance the display
- WEDGE/1/ORDER.LOG
- WRITE/'-------------------------------------------------------
'/END
- LOAD/NSORT.LOG/A
- WEDIT !examine results
- IF SEL:'DO YOU WANT A HARDCOPY (now).'{'NO
YES'}
= YES THEN
- HARDCOPY/NEXT(24)/PAR{SEARCH|}
- ENDIF
ENDIF
IF AUTO_TASK = ENTER_DATA THEN
- ASK/INPUT_DATA/'Enter pilots description of
the
problem'
- ASK/OUTPUT_DATA/'Enter technicians
description
of the fix'
- APPEND/DATAFILE|/SIZE:80L{INPUT_DATA|}`OUTPUT_DATA|
ENDIF
IF AUTO_TASK = EXIT THEN GOTO ENDDEBRIEF
GOTO DEBRIEF_MENU
!ENDDEBRIEF:
WINDOW/REMOVE
ECHO/ON
Credit cards, check or
purchase order accepted.
Contact
Us
E-Mail: sales@USynaptics.com

Universal Synaptics Corporation
1801 West 21st Street
Ogden, Utah 84401 USA
Tel. (801) 731-8508
Fax (801) 731-8509