home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
d_b_a
/
86_12
/
listing1.prg
< prev
next >
Wrap
Text File
|
1986-11-04
|
1KB
|
38 lines
**Filename: UHELP.PRG
**Program: Universal Help program
**Author: J. Ari Kornfeld
**Date : 1-26-86
**Notes : Uses two files: HELP.DBF & HELP.NTX
** Global Variable: selected--the current alias
PROCEDURE Help && The procedure name must be HELP for F1 to work
PARAMETERS MProgName, LineNo, MVarName
PRIVATE key, right, row, col, frame, selected
frame = "╔═╗║╝═╚║ " &&(Used by @..BOX)
SAVE SCREEN
selected = STR(SELECT())
SELECT 10
USE help INDEX help
key = MprogName+SPACE(8-LEN(MprogName))+;
MvarName+SPACE(10-LEN(MvarName))
SEEK key
IF EOF()
@4,10, 7,40 BOX frame
@5,12 SAY 'Sorry, no help is available'
@6,12 SAY ' Press any key to continue.'
ELSE
@Top,Left, Bottom,Right BOX frame
col = left + 1 && move inside the box
row = top + 1
DO WHILE key = ProgName+VarName
@row,col SAY TRIM(HelpMssg)
row = row + 1
SKIP
ENDDO
ENDIF
DO WHILE INKEY() = 0
ENDDO
RESTORE SCREEN
USE
SELECT &selected && return to the active select area
RETURN