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 - getbreak() return the status of the break flag http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 getbreak()          Return the status of the break flag
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   func logical getbreak extern

 Arguments
   None.

 Return
   A logical indicating the status of the DOS break flag.

 Description
   This function returns the status of the 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_getbreak
   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_getbreak()
   endproc

See Also: keydos() setbreak()

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