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 - isdrive() return if the specified drive exist http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 isdrive()           Return if the specified drive exist
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func logical isdrive extern
   param value uint uDrive

 Arguments
   uDrive is the drive number to check for existence. Valid drive
   numbers are 1 to 26, for drives A: to Z:.

 Return
   A logical indicating if the drive exists as a removable, fixed, or
   remote drive.

 Description
   The isdrive() function checks if the specified drive exists.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_isdrive
   vardef
      uint n
   enddef
   for n := 1 to 26                                // check all drives
      if isdrive( n )                              // if drive exists
         ? "Drive", chr( n + '@' ) + ":", "exists" // display message
      endif
   next
   endproc

   proc main
   Test_isdrive()
   endproc

See Also: drivestr()

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