diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 36b4c573a8..c31787f375 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,10 @@ +19991218-10:35 GMT+1 Victor Szel + * source/rtl/objfunc.prg + source/rtl/readkey.prg + + Added documentation by Chen Kedem. + * source/compiler/cmdcheck.c + ! Fixed handling of the /q0 switch. (Provided by Jose) + 19991217-16:40 EDT David G. Holm * config/os2/icc.cf diff --git a/harbour/source/compiler/cmdcheck.c b/harbour/source/compiler/cmdcheck.c index 43975827c0..dd3d7897ed 100644 --- a/harbour/source/compiler/cmdcheck.c +++ b/harbour/source/compiler/cmdcheck.c @@ -373,13 +373,9 @@ void hb_compChkEnvironVar( char * szSwitch ) case 'q': case 'Q': if( *( s + 1 ) == '0' ) - { hb_comp_bLogo = FALSE; - } - else - { - hb_comp_bQuiet = TRUE; - } + + hb_comp_bQuiet = TRUE; break; case 'r': diff --git a/harbour/source/rtl/objfunc.prg b/harbour/source/rtl/objfunc.prg index 2169bf848f..ea3203f8cc 100644 --- a/harbour/source/rtl/objfunc.prg +++ b/harbour/source/rtl/objfunc.prg @@ -40,6 +40,9 @@ * Copyright 1999 Antonio Linares * __objGetMsgList * + * Copyright 1999 Chen Kedem + * Documentation for all functions + * * See doc/license.txt for licensing terms. * */ @@ -48,11 +51,41 @@ #include "error.ch" #include "hboo.ch" -// -// := __objHasData( , ) -// -// Is the symbol present in the object as DATA ? -// +/* $DOC$ + * $FUNCNAME$ + * __objHasData() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Determine whether a symbol exist in object as DATA + * $SYNTAX$ + * __objHasData( , ) --> lExist + * $ARGUMENTS$ + * is an object to scan. + * + * is the name of the symbol to look for. + * $RETURNS$ + * __objHasData() return .T. if the given exist as DATA + * (instance variable) in object , ) --> lExist + * $ARGUMENTS$ + * is an object to scan. + * + * is the name of the symbol to look for. + * $RETURNS$ + * __objHasMethod() return .T. if the given exist as METHOD + * (class function) in object := __objHasMethod( , ) -// -// Is the symbol present in the object as METHOD ? -// function __objHasMethod( oObject, cSymbol ) if !ISOBJECT( oObject ) .or. ; @@ -79,14 +141,54 @@ function __objHasMethod( oObject, cSymbol ) return __objHasMsg( oObject, cSymbol ) .and. ; !__objHasMsg( oObject, "_" + cSymbol ) -// -// __objGetMsgList( , [lDataMethod] ) -// -// Return an array containing the names of all the data items of oObject. -// -// lDataMethod = .T. (default) Return all DATAs -// .F. Return all METHODs -// +/* $DOC$ + * $FUNCNAME$ + * __objGetMsgList() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Return names of all DATA or METHOD for a given object + * $SYNTAX$ + * __objGetMsgList( , [] ) --> aNames + * $ARGUMENTS$ + * is an object to scan. + * + * is an optional logical value that specifies the information + * to return. A value of .T. instruct the function to return list of + * all DATA names, .F. return list of all METHOD names. Default value + * is .T. + * $RETURNS$ + * __objGetMsgList() return an array of character stings with all DATA + * names or all METHOD names for a given object. __objGetMsgList() + * would return an empty array {} if the given object does not contain + * the requested information. + * $DESCRIPTION$ + * __objGetMsgList() is a low level class support function that let you + * find all instance variable or class functions names for a given + * object. + * $EXAMPLES$ + * // show information about TBrowse class + * oB := TBrowseNew( 0, 0, 24, 79 ) + * aData := __objGetMsgList( oB, .T. ) + * aMethod := __objGetMsgList( oB, .F. ) + * FOR i = 1 to len ( aData ) + * ? "DATA name:", aData[ i ] + * NEXT + * FOR i = 1 to len ( aMethod ) + * ? "METHOD name:", aMethod[ i ] + * NEXT + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objGetMsgList() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objGetMethodList(), __objGetValueList(), __objHasData(), + * __objHasMethod() + * $END$ + */ + function __objGetMsgList( oObject, lDataMethod ) local aInfo @@ -126,12 +228,44 @@ function __objGetMsgList( oObject, lDataMethod ) return aData +/* $DOC$ + * $FUNCNAME$ + * __objGetMethodList() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Return names of all METHOD for a given object + * $SYNTAX$ + * __objGetMethodList( ) --> aMethodNames + * $ARGUMENTS$ + * is an object to scan. + * $RETURNS$ + * __objGetMethodList() return an array of character stings with all + * METHOD names for a given object. __objGetMethodList() would return + * an empty array {} if the given object does not contain any METHOD. + * $DESCRIPTION$ + * __objGetMethodList() is a low level class support function that let + * you find all class functions names for a given object. + * It is equivalent to __objGetMsgList( oObject, .F. ). + * $EXAMPLES$ + * // show information about TBrowse class + * oB := TBrowseNew( 0, 0, 24, 79 ) + * aMethod := __objGetMethodList( oB ) + * FOR i = 1 to len ( aMethod ) + * ? "METHOD name:", aMethod[ i ] + * NEXT + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objGetMethodList() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objGetMsgList(), __objGetValueList(), __objHasData(), + * __objHasMethod() + * $END$ + */ -// -// aData __objGetMethodList( oObject ) -// -// Return an array containing the names of all the method of oObject. -// function __objGetMethodList( oObject ) if !ISOBJECT( oObject ) @@ -140,18 +274,51 @@ function __objGetMethodList( oObject ) return __objGetMsgList( oObject, .F. ) +/* $DOC$ + * $FUNCNAME$ + * __objGetValueList() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Return an array of DATA names and values for a given object + * $SYNTAX$ + * __objGetValueList( , [] ) --> aData + * $ARGUMENTS$ + * is an object to scan. + * + * is an optional array with DATA names you want to exclude + * from the scan. + * $RETURNS$ + * __objGetValueList() return a 2D array that contain pairs of a DATA + * symbol name and the value of DATA. __objGetValueList() would return + * an empty array {} if the given object does not contain the requested + * information. + * $DESCRIPTION$ + * __objGetValueList() is a low level class support function that + * return an array with DATA names and value, each array element is a + * pair of: aData[ i, HB_OO_DATA_SYMBOL ] contain the symbol name + * aData[ i, HB_OO_DATA_VALUE ] contain the value of DATA + * $EXAMPLES$ + * // show information about TBrowse class + * oB := TBrowseNew( 0, 0, 24, 79 ) + * aData := __objGetValueList( oB ) + * FOR i = 1 to len ( aData ) + * ? "DATA name:", aData[ i, HB_OO_DATA_SYMBOL ], ; + * " value=", aData[ i, HB_OO_DATA_VALUE ] + * NEXT + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objGetValueList() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * Header file is hboo.ch + * $SEEALSO$ + * __objGetMethodList(), __objGetMsgList(), __objHasData(), + * __objHasMethod(), __objSetValueList() + * $END$ + */ -// -// __objGetValueList( , [] ) -// -// Basically the same as __objGetMsgList except that it returns a 2D array -// containing : -// -// [x][HB_OO_DATA_SYMBOL] Symbol name -// [x][HB_OO_DATA_VALUE] Value of DATA -// -// aExcept is an optional list of DATA you do not want to collect -// function __objGetValueList( oObject, aExcept ) local aDataSymbol @@ -181,13 +348,57 @@ function __objGetValueList( oObject, aExcept ) return aData +/* $DOC$ + * $FUNCNAME$ + * __objSetValueList() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Set object with an array of DATA names and values + * $SYNTAX$ + * __objSetValueList( , ) --> oObject + * $ARGUMENTS$ + * is an object to set. + * + * is a 2D array with a pair of instance variables and values + * for setting those variable. + * $RETURNS$ + * __objSetValueList() return a reference to . + * $DESCRIPTION$ + * __objSetValueList() is a low level class support function that let + * you set a group of instance variables with values. each array + * element in is a pair of: + * aData[ i, HB_OO_DATA_SYMBOL ] which contain the variable name to set + * aData[ i, HB_OO_DATA_VALUE ] contain the new variable value. + * $EXAMPLES$ + * // set some TBrowse instance variable + * oB := TBrowse():New() + * aData := array( 4, 2 ) + * aData[ 1, HB_OO_DATA_SYMBOL ] = "nTop" + * aData[ 1, HB_OO_DATA_VALUE ] = 1 + * aData[ 2, HB_OO_DATA_SYMBOL ] = "nLeft" + * aData[ 2, HB_OO_DATA_VALUE ] = 10 + * aData[ 3, HB_OO_DATA_SYMBOL ] = "nBottom" + * aData[ 3, HB_OO_DATA_VALUE ] = 20 + * aData[ 4, HB_OO_DATA_SYMBOL ] = "nRight" + * aData[ 4, HB_OO_DATA_VALUE ] = 70 + * __objSetValueList( oB, aData ) + * ? oB:nTop // 1 + * ? oB:nLeft // 10 + * ? oB:nBottom // 20 + * ? oB:nRight // 70 + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objSetValueList() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * Header file is hboo.ch + * $SEEALSO$ + * __objGetValueList() + * $END$ + */ -// -// __objSetValueList( , ) -// -// The reverse of __objGetValueList. -// It puts an 2D array of DATA into an object. -// function __objSetValueList( oObject, aData ) if !ISOBJECT( oObject ) @@ -199,12 +410,62 @@ function __objSetValueList( oObject, aData ) return oObject +/* $DOC$ + * $FUNCNAME$ + * __objAddMethod() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Add a METHOD to an already existing class + * $SYNTAX$ + * __objAddMethod( , , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of the new METHOD to add. + * + * is a pointer to a function to associate with the method. + * $RETURNS$ + * __objAddMethod() return a reference to . + * $DESCRIPTION$ + * __objAddMethod() is a low level class support function that add a + * new METHOD to an object. If a symbol with the name + * already exist in a run time error will occur. + * + * Note that is a special pointer to a function that was + * created using the @ operator, see example below. + * $EXAMPLES$ + * // create a new THappy class and add a Smile method + * oHappy := TClass():New( "THappy" ) + * __objAddMethod( oHappy, "Smile", @MySmile() ) + * ? oHappy:Smile( 1 ) // :) + * ? oHappy:Smile( 2 ) // ;) + * ? oHappy:Smile( 3 ) // *SMILE* + * + * STATIC FUNCTION MySmile( nType ) + * LOCAL cSmile + * DO CASE + * CASE nType == 1 + * cSmile := ":)" + * CASE nType == 2 + * cSmile := ";)" + * CASE nType == 3 + * cSmile := "*SMILE*" + * ENDCASE + * RETURN cSmile + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objAddMethod() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddInline(), __objAddData(), __objDelMethod(), + * __objGetMethodList(), __objGetMsgList(), __objHasMethod(), + * __objModMethod() + * $END$ + */ -// -// := __objAddMethod( , , ) -// -// Add a method to an already existing class -// function __objAddMethod( oObject, cSymbol, nFuncPtr ) if !ISOBJECT( oObject ) .or. ; @@ -221,12 +482,49 @@ function __objAddMethod( oObject, cSymbol, nFuncPtr ) return oObject +/* $DOC$ + * $FUNCNAME$ + * __objAddInline() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Add an INLINE to an already existing class + * $SYNTAX$ + * __objAddInline( , , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of the new INLINE to add. + * + * is a code block to associate with the INLINE method. + * $RETURNS$ + * __objAddInline() return a reference to . + * $DESCRIPTION$ + * __objAddInline() is a low level class support function that add a + * new INLINE method to an object. If a symbol with the name + * already exist in a run time error will + * occur. + * $EXAMPLES$ + * // create a new THappy class and add a Smile INLINE method + * oHappy := TClass():New( "THappy" ) + * bInline := { | nType | { ":)", ";)", "*SMILE*" }[ nType ] } + * __objAddInline( oHappy, "Smile", bInline ) + * ? oHappy:Smile( 1 ) // :) + * ? oHappy:Smile( 2 ) // ;) + * ? oHappy:Smile( 3 ) // *SMILE* + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objAddInline() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddData(), __objAddMethod(), __objDelInline(), + * __objGetMethodList(), __objGetMsgList(), __objHasMethod(), + * __objModInline() + * $END$ + */ -// -// := __objAddInline( , , ) -// -// Add an INLINE to an already existing class -// function __objAddInline( oObject, cSymbol, bInline ) if !ISOBJECT( oObject ) .or. ; @@ -242,12 +540,48 @@ function __objAddInline( oObject, cSymbol, bInline ) return oObject +/* $DOC$ + * $FUNCNAME$ + * __objAddData() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Add a DATA to an already existing class + * $SYNTAX$ + * __objAddData( , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of the new DATA to add. + * $RETURNS$ + * __objAddData() return a reference to . + * $DESCRIPTION$ + * __objAddData() is a low level class support function that add a new + * DATA to an object. If a symbol with the name already + * exist in a run time error will occur. + * $EXAMPLES$ + * // create a new THappy class and add a lHappy DATA + * oHappy := TClass():New( "THappy" ) + * __objAddData( oHappy, "lHappy" ) + * oHappy:lHappy := .T. + * IF oHappy:lHappy + * ? "Happy, Happy, Joy, Joy !!!" + * ELSE + * ? ":(..." + * ENDIF + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objAddData() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddInline(), __objAddMethod(), __objDelData(), + * __objGetMsgList(), __objGetValueList(), __objHasData(), + * __objSetValueList() + * $END$ + */ -// -// := __objAddData( , ) -// -// Add a DATA to an already existing class -// function __objAddData( oObject, cSymbol ) local nSeq @@ -269,12 +603,75 @@ function __objAddData( oObject, cSymbol ) return oObject +/* $DOC$ + * $FUNCNAME$ + * __objModMethod() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Modify (replace) a METHOD in an already existing class + * $SYNTAX$ + * __objModMethod( , , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of the METHOD to modify. + * + * is a pointer to a new function to associate with the + * method. + * $RETURNS$ + * __objModMethod() return a reference to . + * $DESCRIPTION$ + * __objModMethod() is a low level class support function that modify + * a METHOD in an object and replace it with a new function. If a + * symbol with the name does not exist in a run + * time error will occur. __objModMethod() is used in inheritance + * mechanism. + * + * Note that is a special pointer to a function that was + * created using the @ operator, see example below. + * $EXAMPLES$ + * // create a new THappy class and add a Smile method + * oHappy := TClass():New( "THappy" ) + * __objAddMethod( oHappy, "Smile", @MySmile() ) + * ? oHappy:Smile( 1 ) // :) + * ? oHappy:Smile( 2 ) // ;) + * // replace Smile method with a new function + * __objAddMethod( oHappy, "Smile", @YourSmile() ) + * ? oHappy:Smile( 1 ) // *SMILE* + * ? oHappy:Smile( 2 ) // *WINK* + * + * STATIC FUNCTION MySmile( nType ) + * LOCAL cSmile + * DO CASE + * CASE nType == 1 + * cSmile := ":)" + * CASE nType == 2 + * cSmile := ";)" + * ENDCASE + * RETURN cSmile + * + * STATIC FUNCTION YourSmile( nType ) + * LOCAL cSmile + * DO CASE + * CASE nType == 1 + * cSmile := "*SMILE*" + * CASE nType == 2 + * cSmile := "*WINK*" + * ENDCASE + * RETURN cSmile + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objModMethod() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddMethod(), __objDelMethod(), __objGetMethodList(), + * __objGetMsgList(), __objHasMethod() + * $END$ + */ -// -// := __objModMethod( , , ) -// -// Modify a method to an already existing class -// function __objModMethod( oObject, cSymbol, nFuncPtr ) if !ISOBJECT( oObject ) .or. ; @@ -291,12 +688,53 @@ function __objModMethod( oObject, cSymbol, nFuncPtr ) return oObject +/* $DOC$ + * $FUNCNAME$ + * __objModInline() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Modify (replace) an INLINE method in an already existing class + * $SYNTAX$ + * __objModInline( , , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of the INLINE method to modify. + * + * is a new code block to associate with the INLINE method. + * $RETURNS$ + * __objModInline() return a reference to . + * $DESCRIPTION$ + * __objModInline() is a low level class support function that modify + * an INLINE method in an object and replace it with a new code block. + * If a symbol with the name does not exist in + * a run time error will occur. __objModInline() is used in inheritance + * mechanism. + * $EXAMPLES$ + * // create a new THappy class and add a Smile INLINE method + * oHappy := TClass():New( "THappy" ) + * bMyInline := { | nType | { ":)", ";)" }[ nType ] } + * bYourInline := { | nType | { "*SMILE*", "*WINK*" }[ nType ] } + * __objAddInline( oHappy, "Smile", bMyInline ) + * ? oHappy:Smile( 1 ) // :) + * ? oHappy:Smile( 2 ) // ;) + * // replace Smile inline method with a new code block + * __objModInline( oHappy, "Smile", bYourInline ) + * ? oHappy:Smile( 1 ) // *SMILE* + * ? oHappy:Smile( 2 ) // *WINK* + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objModInline() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddInline(), __objDelInline(), __objGetMethodList(), + * __objGetMsgList(), __objHasMethod() + * $END$ + */ -// -// := __objModInline( , , ) -// -// Modify an INLINE to an already existing class -// function __objModInline( oObject, cSymbol, bInline ) if !ISOBJECT( oObject ) .or. ; @@ -313,12 +751,64 @@ function __objModInline( oObject, cSymbol, bInline ) return oObject +/* $DOC$ + * $FUNCNAME$ + * __objDelMethod() | __objDelInline() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Delete a METHOD or INLINE method from class + * $SYNTAX$ + * __objDelMethod( , ) --> oObject + * + * or + * + * __objDelInline( , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of METHOD or INLINE method to be + * deleted (removed) from the object. + * $RETURNS$ + * __objDelMethod() return a reference to . + * $DESCRIPTION$ + * __objDelMethod() is a low level class support function that delete + * (remove) a METHOD or an INLINE method from an object. If a symbol + * with the name does not exist in a run time error + * will occur. + * + * __objDelInline() is exactly the same as __objDelMethod(). + * $EXAMPLES$ + * // create a new THappy class and add a Smile method + * oHappy := TClass():New( "THappy" ) + * __objAddMethod( oHappy, "Smile", @MySmile() ) + * ? __objHasMethod( oHappy, "Smile" ) // .T. + * // remove Smile method + * __objDelMethod( oHappy, "Smile" ) + * ? __objHasMethod( oHappy, "Smile" ) // .F. + * + * STATIC FUNCTION MySmile( nType ) + * LOCAL cSmile + * DO CASE + * CASE nType == 1 + * cSmile := ":)" + * CASE nType == 2 + * cSmile := ";)" + * ENDCASE + * RETURN cSmile + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objDelMethod() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddInline(), __objAddMethod(), __objGetMethodList(), + * __objGetMsgList(), __objHasMethod(), __objModInline(), + * __objModMethod() + * $END$ + */ -// -// := __objDelMethod( , ) -// -// Delete a method from an already existing class -// function __objDelMethod( oObject, cSymbol ) if !ISOBJECT( oObject ) .or. ; @@ -337,11 +827,46 @@ return oObject function __objDelInline( oObject, cSymbol ) return __objDelMethod( oObject, cSymbol ) // Same story -// -// := __objDelData( , ) -// -// Delete a DATA from an already existing class -// +/* $DOC$ + * $FUNCNAME$ + * __objDelData() + * $CATEGORY$ + * Object manipulation + * $ONELINER$ + * Delete a DATA (instance variable) from class + * $SYNTAX$ + * __objDelMethod( , ) --> oObject + * $ARGUMENTS$ + * is the object to work on. + * + * is the symbol name of DATA to be deleted (removed) from + * the object. + * $RETURNS$ + * __objDelData() return a reference to . + * $DESCRIPTION$ + * __objDelData() is a low level class support function that delete + * (remove) a DATA from an object. If a symbol with the name + * does not exist in a run time error will occur. + * $EXAMPLES$ + * // create a new THappy class and add a lHappy DATA + * oHappy := TClass():New( "THappy" ) + * __objAddData( oHappy, "lHappy" ) + * ? __objHasData( oHappy, "lHappy" ) // .T. + * // remove lHappy DATA + * __objDelData( oHappy, "lHappy" ) + * ? __objHasData( oHappy, "lHappy" ) // .F. + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * __objDelData() is an Harbour extension. + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * __objAddData(), __objGetMsgList(), __objGetValueList(), + * __objHasData(), __objSetValueList() + * $END$ + */ + function __objDelData( oObject, cSymbol ) if !ISOBJECT( oObject ) .or. ; diff --git a/harbour/source/rtl/readkey.prg b/harbour/source/rtl/readkey.prg index 2cf860ff03..45f82c92fd 100644 --- a/harbour/source/rtl/readkey.prg +++ b/harbour/source/rtl/readkey.prg @@ -33,8 +33,70 @@ * */ +/* + * The following parts are Copyright of the individual authors. + * www - http://www.harbour-project.org + * + * Copyright 1999 Chen Kedem + * READKEY() documentation + * + * See doc/license.txt for licensing terms. + * + */ + #include "inkey.ch" +/* $DOC$ + * $FUNCNAME$ + * READKEY()* + * $CATEGORY$ + * Data input and output + * $ONELINER$ + * Find out which key terminate a READ + * $SYNTAX$ + * READKEY() --> nKeyCode + * $ARGUMENTS$ + * none. + * $RETURNS$ + * READKEY() return a numeric code representing the key that cause READ + * to terminate. + * $DESCRIPTION$ + * READKEY() is used after a READ was terminated to determine the exit + * key pressed. If the get buffer was updated during READ, 256 is added + * to the return code. + * + * Exit key Return code Return code + * (not updated) (updated) + * -------------- ------------- ----------- + * Up 4 260 + * Down 5 261 + * Page-Up 6 262 + * Page-Down 7 263 + * Ctrl Page-Up 34 290 + * Ctrl Page-Down 35 291 + * Esc 12 268 + * Ctrl End 14 270 + * Enter 15 271 + * + * Key >= 32 15 271 + * otherwise 0 0 + * + * READKEY() is a compatibility function so try not use it. READKEY() + * is superseded by LASTKEY() which return INKEY() code for that key, + * UPDATED() could be use to find if the get buffer was changed during + * READ. + * $EXAMPLES$ + * $TESTS$ + * $STATUS$ + * $COMPLIANCE$ + * READKEY() works exactly like CA-Clipper's READKEY(). + * $PLATFORMS$ + * $FILES$ + * $SEEALSO$ + * @...GET, INKEY(), LASTKEY(), READ, READEXIT(), UPDATED() + * $END$ + */ + FUNCTION ReadKey() LOCAL nKey := LastKey()