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 - chkopen() check if the specified alias is open http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 chkopen()           Check if the specified alias is open
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func logical chkopen extern
   param alias sDatabase

 Arguments
   sDatabase is the alias to retrieve information about.

 Return
   A logical indicating if the database is open.

 Description
   The chkopen() function returns .t. if the specified alias is open.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_chkopen
   // check if a database is opened prior to using the open command
   vardef
      uint n
   enddef
   for n := 1 to 2
      if chkopen( sTest )
         ? "Database already opened"
      else
         ? "Opening database"
         open sTest
      endif
   next
   endproc

   proc main
   Test_chkopen()
   endproc

See Also: open

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