Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - setbreak() allow the break key to stop a process http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setbreak()          Allow the break key to stop a process
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   proc setbreak extern
   param value logical lBreak

 Arguments
   lBreak is the break setting.

 Return
   None.

 Description
   This procedures modifies the status of the DOS break flag. This flag
   is usually set by a set break command in autoexec.bat. If the break flag
   is set, it is possible to stop a process with Ctrl-C/Ctrl-Break during
   data entry.

   In a Force application, this feature can only be utilized if the DOS
   keyboard driver keydos() is active.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_setbreak
   vardef
      logical    lBreak
      char( 15 ) cName
   enddef
   clear
   cName := "Marianne"
   keydos()
   lBreak := getbreak()
   ? lBreak
   setbreak( .not. lBreak )
   ? getbreak()
   setbreak( lBreak )
   ? getbreak()
   
   setbreak( .t. )
   @ 10, 10 get cName           // now try Ctrl-C
   read
   endproc

   proc main
   Test_setbreak()
   endproc

See Also: getbreak() keydos()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson