Microsoft KB Archive/108345

From BetaArchive Wiki
Knowledge Base

Article ID: 108345

Article Last Modified on 10/17/2003


  • Microsoft FORTRAN PowerStation 32
  • Microsoft FORTRAN PowerStation 32

This article was previously published under Q108345


Page 553 of the Microsoft FORTRAN PowerStation 32 "Programmer's Guide" states that GetCharQQ will not accept function keys under QuickWin. The manual fails to state that direction keys are also not accepted by GetCharQQ under QuickWin.


QuickWin uses the direction keys to scroll the active window. The direction keys are trapped by QuickWin before GetCharQQ has a chance to interpret them.


Microsoft has confirmed this to be a problem in Microsoft FORTRAN PowerStation 32 version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

NOTE: Under FORTRAN PowerStation 4.0, GetCharQQ will accept function keys under QuickWin. Direction keys are still trapped by QuickWin for scrolling the active window.


The sample program below, built as a QuickWin application, does not work with the direction keys. The same program built as a console application can identify direction keys. This is done by using the extended code obtained by calling GetCharQQ a second time.

Sample Code

C Compile options needed: /MW (to duplicate problem)

      INCLUDE ''
      INCLUDE 'flib.fd'
      CHARACTER*1 key / 'A' / 
      WRITE (*,*) ' Type a key; (or q to quit)'
C     Read and display keys until ESC is pressed.
      DO WHILE (ICHAR(key) .NE. 27)
      key = GETCHARQQ()
C     If extended key, its control or function key
      IF ((ICHAR(key) .EQ. 0) .OR.
     +       (ICHAR(key) .EQ. 224)) THEN
            key = GETCHARQQ()
            WRITE (*,900) 'ASCII: no    Char: NA    '
C     Otherwise, there's only one key
            WRITE (*,900) 'ASCII: yes   Char: '
            WRITE (*,900) key
      END IF
            WRITE (*, 901) ICHAR(key), ICHAR(key)
      IF (key .EQ. 'q') EXIT
      END DO
900   FORMAT (1X, A, \)
901   FORMAT (1X, 'Decimal: ', I3, '   Hex: ',Z4, /)

Additional query words: 1.00

Keywords: kblangfortran kbcode KB108345