home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / gt_isdat.prg < prev    next >
Text File  |  1993-10-14  |  1KB  |  54 lines

  1. /*
  2.     File......: GT_IsData.prg
  3.     Author....: Martin Bryant
  4.     BBS.......: The Dark Knight Returns
  5.     Net/Node..: 050/069
  6.     User Name.: Martin Bryant
  7.     Date......: 12/02/93
  8.     Revision..: 1.0
  9.  
  10.     This is an original work by Martin Bryant and is placed
  11.     in the public domain.
  12.  
  13.     Modification history:
  14.     ---------------------
  15.  
  16.     Rev 1.0 12/02/93
  17.     PD Revision.
  18. */
  19.  
  20. /*  $DOC$
  21.  *  $FUNCNAME$
  22.  *      GT_ISDATA()
  23.  *  $CATEGORY$
  24.  *      General
  25.  *  $ONELINER$
  26.  *      IsData validates a number as being ASCII Text.
  27.  *  $SYNTAX$
  28.  *      GT_IsData(<nKey>) -> lData
  29.  *  $ARGUMENTS$
  30.  *      <nKey> is the ASCII value to test.
  31.  *  $RETURNS$
  32.  *      lData
  33.  *  $DESCRIPTION$
  34.  *      IsData validates a number as being ASCII Text.
  35.  *  $EXAMPLES$
  36.  *      // Trim out control chars
  37.  *      IF .NOT. GT_IsData(nKey)
  38.  *          ? 'Error'
  39.  *      ENDIF
  40.  *  $SEEALSO$
  41.  *
  42.  *  $INCLUDE$
  43.  *
  44.  *  $END$
  45.  */
  46.  
  47. #include "GT_LIB.ch"
  48.  
  49. FUNCTION GT_IsData(nData)
  50. /*
  51.     End of GT_IsData()
  52. */
  53. RETURN(nData >= 32 .AND. nData < 127 .AND. Chr(nData) != ";")
  54.