FKLABEL( ) Function

Returns the name of the function key (F1, F2, F3 ...) from the key's corresponding function key number.

FKLABEL(nFunctionKeyNumber)

Return Values

Character

Parameters

  • nFunctionKeyNumber
    Specifies the function key number. The value of nFunctionKeyNumber should be from 0 through the number of function keys minus 1. FKLABEL( ) returns the empty string if nFunctionKeyNumber is greater than the number of function keys minus 1. The number of function keys can be determined with FKMAX( ).

Remarks

Function keys can be programmed with SET FUNCTION.

The value returned by FKLABEL( ) is affected by SET COMPATIBLE. When COMPATIBLE is set to FOXPLUS (the default), FKLABEL( ) returns the function keys. When COMPATIBLE is set to DB4, FKLABEL( ) returns the function key and function key combinations (F1, CTRL+F1, SHIFT+F1, F2, CTRL+F2, SHIFT+F2, ...).

Example

CLEAR
SET COMPATIBLE OFF
? 'COMPATIBLE OFF'
?
FOR nCount = 1 TO FKMAX( )  && Loop for # of function keys
   ? FKLABEL(nCount)  && Display programmable function keys
ENDFOR
SET COMPATIBLE ON

?
? 'COMPATIBLE ON'
?
FOR nCount = 1 TO FKMAX( )  && Loop for # of function keys
   ? FKLABEL(nCount)  && Display programmable function keys
ENDFOR

See Also

FKMAX( ) | SET COMPATIBLE | SET FUNCTION