home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / TECLADO / FINPUT.ZIP / TSTINPUT.PF3 < prev    next >
Encoding:
Text File  |  1990-07-06  |  2.4 KB  |  81 lines

  1. 'Name                         TSTINPUT
  2. 'Purpose                      To test the function  finput()
  3. '                             Please Note: the project Finput must
  4. '                             be loaded prior to running this program
  5. 'Written by                   Jim Heffernan  St. Louis Mo.
  6. '                             Member:  St. Louis User Group For IBM PC
  7.  
  8. '***********************  Variable definitions **************
  9. external finput()
  10. public $key, $textvar,$txt,$ftxt,$screen,$endhlp
  11.  
  12. '***********************  End of Definitions   ****************
  13.  
  14. screen clear 15 0
  15. screen clear box 22 1 25 80 7 0 no-border
  16. screen print 2 1 10 1 format "M80" "  This Procedure Test The Function Finput()  "
  17. screen print 22 1 10 1 format "M80" "  Press F10 to Quit... F1 for Help Screen  "
  18. screen draw box 1 1 21 80 15 0
  19. repaint off
  20.  
  21. label again
  22. repaint off
  23.  
  24. ' parameters for finput = (row,column,foreground,background,length)
  25.  
  26. finput(5,10,10,9,10)
  27.  
  28. if cerror <> 0
  29.    message "Function Finput.rf3  Must Be Loaded in Memory First...Press any key"
  30.    jump alldone
  31. end if
  32.  
  33. screen clear box 7 15 8 50 7 0 no-border
  34. screen print 7 15 15 0 "$textvar   =  "| $textvar
  35. screen print 8 15 15 0 "$key      =  "| chr($key)
  36. screen print 24 1 15 0 "These are the results of Finput()... "
  37.  
  38. if $key = {F10}
  39.  jump alldone
  40. '******************  Help screen section  ***************************
  41. elseif $key = {F1}
  42.   locate 1 1 0
  43.   screen save 1 1 22 80 $screen
  44.   error off
  45.   data goto window 1
  46.   data goto view "help.vw"
  47.   if cerror <> 0
  48.        screen clear 7 0
  49.        screen clear box 22 1 25 80 7 0 no-border
  50.        screen clear box 10 20 12 60 15 1
  51.        screen print 11 25 15 1 " Loading Help Screen "
  52.       file load  custom-view "help.vw"
  53.   end if
  54.  
  55.   order change key [title]
  56.   data find "[title]" equal "Finput()" options "g"
  57.   if cerror <> 0
  58.     beep 2
  59.     message "Sorry There is no help for this input"
  60.     screen shortrestore $screen
  61.     jump continue
  62.   end if
  63.   screen clear 7 0
  64.   repaint
  65.   screen clear box 22 1 25 80 7 0 no-border
  66.   screen print 22 1 15 1 format "M80" "..Press Esc Key to End Help.."
  67.   label askinchar
  68.   $endhlp = inchar
  69.   if $endhlp = {ESC}
  70.      screen clear box 22 1 25 80 7 0 no-border
  71.      screen shortrestore $screen
  72.   else
  73.      jump askinchar
  74.   end if
  75.   label continue
  76.   file unload view "help.vw"
  77. end if
  78. '*************************  End of help section *********************
  79. jump again
  80. label alldone
  81.