Check if A-drive is ready 
Author Message
 Check if A-drive is ready

Hello World,

In one of my applications, I have to read data-files from a
floppy-drive.
I can check if the files (A:\data\trc005.dat, ...) exist, and warn the
user if not. But when there is NO floppy in drive A:, that famous
Microsoft-message "Abort, Retry or Fail ?", interrupts my program.

My question: How can I check if the A-drive is pressent before DOS
(aahhhgg) does ?

By the way: I'm Using Borland C++ 3.1 for dos.

sorry if this is a FAQ. (can someone give me a link to it, if it
exists ?)

TIA,

Koen.

-----------------------------------------------------------------------
PROVIRON INDUSTRIES N.V.                       "in abundance of water
Koen Van de Velde                               only fools are thirsty"

+32-3.870.88.20



Sun, 02 Aug 1998 03:00:00 GMT  
 Check if A-drive is ready


Quote:
>Hello World,

Even though the previous string is a frequently seen C term,
the following is not a question for comp.lang.c[.moderated]

Quote:
>My question: How can I check if the A-drive is pressent before DOS
>(aahhhgg) does ?

The C language does not support the concept of drives.
The moderator does not allow questions of this type.
His/her AI machine that scans articles probably glitched. :-)

[I plead distraction - my wife was watching a brilliant version of
 _Cyrano de Bergerac_, and I was getting drawn in. -mod]

Bye, Jens

ObC: What is the canonical first program to write in C?  Is it

        "Hello World\n" or
        "Hello, world\n" or
        "hello world\n" or what?

Please cite authoritative sources or use statistics.
--
SIGSIG -- signature too long (core dumped)



Sun, 02 Aug 1998 03:00:00 GMT  
 Check if A-drive is ready

:Hello World,
:
:In one of my applications, I have to read data-files from a
:floppy-drive.
:I can check if the files (A:\data\trc005.dat, ...) exist, and warn the
:user if not. But when there is NO floppy in drive A:, that famous
:Microsoft-message "Abort, Retry or Fail ?", interrupts my program.
:
:My question: How can I check if the A-drive is pressent before DOS
:(aahhhgg) does ?
:
:By the way: I'm Using Borland C++ 3.1 for dos.
:
:sorry if this is a FAQ. (can someone give me a link to it, if it
:exists ?)
:
  I'm surprised this one got past the moderator, as it's not really about C
at all.  This more or less falls under comp.os.msdos.programmer, where I'm
sure they'll tell you to intercept INT 24h and the AH and DI registers
contain the information about the critical error.

  -spc (The information is also in Ralf Brown's Interrupt List)



Mon, 03 Aug 1998 03:00:00 GMT  
 Check if A-drive is ready

Quote:
>ObC: What is the canonical first program to write in C?  Is it

>    "Hello World\n" or
>    "Hello, world\n" or
>    "hello world\n" or what?

>Please cite authoritative sources or use statistics.

According to the most authoritative source, K&R2, which introduced the
program (well, it was K&R1), it's "hello, world\n".  It seems that
B. Kernighan likes punctuation but hates capitalization :-)

Dan
--
Dan Pop
CERN, CN Division

Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



Tue, 04 Aug 1998 03:00:00 GMT  
 Check if A-drive is ready

Quote:
>ObC: What is the canonical first program to write in C?  Is it

>    "Hello World\n" or
>    "Hello, world\n" or
>    "hello world\n" or what?

>Please cite authoritative sources or use statistics.

Quoting K&R1:

   The only way to learn a new programming language is by writing
   programs in it.  The first program to write is the same for all
   languages:

      Print the words
              hello, world

   [...]  In C, the program to print "hello, world" is

      main()
      {
          printf("hello, world\n");
      }

K&R2 adds "#include <stdio.h>" to this program.  That addition should be
made if we're speaking of ANSI C (vs. traditional pre-ANSI X3.159-1989 C).

--



Tue, 04 Aug 1998 03:00:00 GMT  
 Check if A-drive is ready

Quote:

>ObC: What is the canonical first program to write in C?  Is it

>    "Hello World\n" or
>    "Hello, world\n" or
>    "hello world\n" or what?

GNU hello (THE greeting printing program) supports two forms:

hello, world            (with --traditional)
Hello, world!           (default)

The GNU hello package is 274 kilobytes unzipped. `hello -m' prints your
mail.

Jari Kokko



Tue, 04 Aug 1998 03:00:00 GMT  
 Check if A-drive is ready

: The C language does not support the concept of drives.
: The moderator does not allow questions of this type.
: His/her AI machine that scans articles probably glitched. :-)

: [I plead distraction - my wife was watching a brilliant version of
:  _Cyrano de Bergerac_, and I was getting drawn in. -mod]

The one with Gerrard Depardieu?  Distraction granted :)

/Alby



Sun, 09 Aug 1998 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Check if A-drive is ready

2. How to handle drive not ready and disk write protected errors in C language

3. Help:Test if drive is ready in Turbo C

4. MSDEV.EXE - Drive Not Ready

5. Find out if drive is ready

6. Checking Who Am I?

7. Checking for valid drives

8. Check drive A

9. Check if A-drive is r

10. How do I stop VC checking files on mounted drive

11. Check if there is a disk in the drive

12. Need an API function to check for/map network drive under Win32

 

 
Powered by phpBB® Forum Software