Creating Child Windows

The FILE='USER' option in the OPEN statement opens a child window. The child window defaults to a scrollable text window, 30 rows by 80 columns. You can open up to 40 child windows.

Running a QuickWin application displays the frame window, but not the child window. You must call SETWINDOWCONFIG or execute an I/O statement or a graphics statement to display the child window. The window receives output by its unit number, as in:

  OPEN (UNIT= 12, FILE= 'USER', TITLE= 'Product Matrix')
  WRITE (12, *) 'Enter matrix type: '

Child windows opened with FILE='USER' must be opened as sequential-access formatted files (the default). Other file specifications (direct-access, binary, or unformatted) result in run-time errors.

The following example creates three child windows. A frame window is automatically created. Text is written to each so the child windows are visible:

  program testch
   use dflib
   open(11,file="user")
   write(11,*) "Hello 11"
   open(12,file="user")
   write(12,*) "Hello 12"
   open(13,file="user")
   write(13,*) "Hello 13"
   write(13,*) "Windows 11, 12, and 13 can be read and written with normal"
   write(13,*) "Fortran I/O statements. The size of each window on the screen"
   write(13,*) "can be modified by SETWSIZEQQ. The size of the virtual window"
   write(13,*) "(i.e., a data buffer) can be modified by SETWINDOWCONFIG."
   read(13,*)
  end

When this program is run, the output appears as follows:

example of child windows