home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / DATABASE / CLIPPC.ZIP / ALPHN.PRG < prev    next >
Encoding:
Text File  |  1988-03-02  |  1.2 KB  |  47 lines

  1. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2. *  File: AlphN.prg
  3. *
  4. *  Author: Mark Pfeifer
  5. *
  6. *  Revision:
  7. *     2-Mar-88    initial coding
  8. *
  9. *  Copyright: none, placed in the public domain by author
  10. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  11.  
  12. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  13. * func AlphaN
  14. *
  15. *   syntax:   AlphaN(<exp-N>)
  16. *      where <exp-N> is number from 0 to 35 to be converted to an Alpha
  17. *   returns:  string of 1 char
  18. *
  19. *   This function comes in handy when accessing multiple parameters,
  20. *   for example, see the UpEq function.
  21. *
  22. *   AlphaN converts a number from 0 to 35 to an Alpha as follows:
  23. *
  24. *              <exp-N>  return value
  25. *                 0        '0'
  26. *                 1        '1'
  27. *                     ...
  28. *                 9        '9'
  29. *                10        'A'
  30. *                11        'B'
  31. *                     ...
  32. *                34        'Y'
  33. *                35        'Z'
  34. *
  35.  
  36. func AlphaN
  37. para pN
  38.  
  39.    priv mRet
  40.  
  41.    mRet=Substr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",pN+1,1)
  42.  
  43. return mRet
  44.  
  45. * end of func AlphaN
  46. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  47.