FIX: CHAR(26) to Device Causes F6422: No Space Left on Device

ID: Q71464


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 3.13, 3.2, 3.31, 3.33, 4.01, 4.1, 5.0, 5.1


SYMPTOMS

A program compiled with Microsoft FORTRAN that attempts to write CHAR(26) to a device such as the printer or screen, may have as a result one of the following problems during execution under MS-DOS:

  1. Run-time error F6422: WRITE(device) - no space left on device


  2. No character is output.


  3. ? error: Device full error in file(device) Error Code 1028; Status 0008; PC=11AA; 000C; SS=29BE; FP=0008; SP=1196


Compiling the same program with FORTRAN version 4.1, 5.0 or 5.1 for protected-mode execution and running under OS/2 will print the desired ASCII character (left arrow) to the device.


STATUS

Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions 3.x, 4.x, and 5.x for MS-DOS. This problem was corrected in FORTRAN PowerStation.


MORE INFORMATION

The following program illustrates the problem of sending CHAR(26) to a device. The user inputs the device that CHAR(26) is to be sent to into the variable "flnm." Possible devices include the screen (CON), printer (PRN, LPT1), or communications port (COM1).


      character*5 flnm
      read(*,'(a)') flnm
      open(1,file=flnm,status='old')
      write(1,'(1x,a)') char(26)
      end 
CHAR(26) is the ASCII code for the end-of-file marker or CTRL+Z (^Z). When this character is output to a device under MS-DOS, as in the program above, the character may be suppressed or the F6422 run-time error may be generated.

CHAR(26) can be sent to a file correctly, which can then be sent to the desired device. It can also be sent to a device correctly while running under OS/2.

Additional query words: 5.00 5.10

Keywords :
Version : :3.13,3.2,3.31,3.33,4.0,4.01,4.1,5.0,5.1
Platform :
Issue type :


Last Reviewed: November 1, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.