Files
harbour-core/contrib/hbnf/tests/popadder.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

44 lines
1.2 KiB
Plaintext

#require "hbnf"
#include "inkey.ch"
PROCEDURE Main()
LOCAL nSickHrs := 0
LOCAL nPersHrs := 0
LOCAL nVacaHrs := 0
LOCAL GetList := {}
SET SCOREBOARD OFF
CLS
SetKey( K_ALT_A, {|| ft_Adder() } ) // Make <ALT-A> call FT_Adder
// SIMPLE Sample of program data entry!
@ 12, 5 SAY "Please enter the total Sick, Personal, and Vacation hours."
@ 15, 22 SAY "Sick hrs."
@ 15, 40 SAY "Pers. hrs."
@ 15, 60 SAY "Vaca. hrs."
@ 23, 20 SAY "Press <ALT-A> to Pop - Up the Adder."
@ 24, 20 SAY "Press <ESC> to Quit the adder Demo."
DO WHILE .T. // Get the sick, personal, and vaca
@ 16, 24 GET nSickHrs PICTURE "9999.999" // Normally I have a VALID()
@ 16, 43 GET nPersHrs PICTURE "9999.999" // to make sure the value is
@ 16, 63 GET nVacaHrs PICTURE "9999.999" // within the allowable range.
SET CURSOR ON // But, like I said it is a
CLEAR TYPEAHEAD // SIMPLE example <g>.
READ
SET CURSOR OFF
IF LastKey() == K_ESC // <ESC> - ABORT
CLEAR TYPEAHEAD
EXIT
ENDIF
ENDDO
SET CURSOR ON
SET KEY K_ALT_A // Reset <ALT-A>
RETURN