[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+----------------+#########################################################
#+-| ACTIVATE_PROCS |--------------------------------------------+############
#| +----------------+ Activates all procedures installed via the |############
#| timer_entry() or proc_entry() functions |############
#+---------------------------------------------------------------+############
##############################################################################
##############################################################################
#+--| Summary |-------------+#################################################
#| #INCLUDE tsr.hdr |#################################################
#+--------------------------+#################################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------+###############################
#| PROCEDURE activate_procs PROTOTYPE |###############################
#+--------------------------------------------+###############################
##############################################################################
##############################################################################
####+---| Description |---------------------------------------------------+###
####| The activate_procs procedure activates all procedures installed via |###
####| the timer_entry() or proc_entry() functions. The application does |###
####| not terminate and processing continues on the command or statement |###
####| following the activate_procs call. If you wish the application to |###
####| terminate and stay resident, use the tsr procedure. |###
####+---------------------------------------------------------------------+###
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Activate an alarm procedure. |#########
#########| |#########
#########| #include tsr.hdr |#########
#########| #include string.hdr |#########
#########| VARDEF |#########
#########| CHAR(8) alarm_time |#########
#########| CHAR(40) alarm_msg |#########
#########| LOGICAL alarm_on |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE alarm |#########
#########| IF time() = alarm_time .AND. alarm_on |#########
#########| ? chr(7) + alarm_msg + chr(7) |#########
#########| alarm_on = .F. |#########
#########| ENDIF |#########
#########| ENDPRO |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| |#########
#########| ACCEPT "Time to be notified: " TO alarm_time |#########
#########| ACCEPT "Time message: " TO alarm_msg |#########
#########| |#########
#########| timer_entry( alarm, 10, &TSR_TIME_SECS, ; |#########
#########| &TSR_CALL_ANY ) |#########
#########| activate_procs() |#########
#########| |#########
#########| DO order_entry |#########
#########| {...} |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Install two "hot-key" sequences to be used only |#########
#########| * while the program is running conventionally, |#########
#########| * i.e., not as a "tsr". |#########
#########| |#########
#########| a = proc_entry( proc1,"<Ctrl><F1>",&TSR_CALL_DOS ) |#########
#########| b = proc_entry( proc2,"<Alt><F10>",&TSR_CALL_ANY ) |#########
#########| IF a .AND. b |#########
#########| activate_procs() |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
proc_entry()
timer_entry()
tsr
unload_tsr
...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson