Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) Tools Help GTL - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

GT_ASCPOS()

Return the ascii value of a specified character in a string
---------------------------------------------------------------------------------

 Syntax

        GT_Ascpos(<cStr>, <nPos>) --> nAscVal  

 Arguments

        <cStr>    - The string <nPos>  - The position in <cStr>     

 Returns

        <nAscVal>   - The ascii value of substr(<cStr>, <nPos>, 1)    

 Description

      Return the ascii value of a specified character in a string
      Equivalent (but much faster) to  asc(substr(cStr, nPos, 1)

      NOTE:  invalid parameters will return -1  nPos > len(cStr)   will
      return -2

      This last behaviour is different to the Funcky function of the  same
      name.  I changed the behaviour because some of the strings  I
      process contain embedded NULs.

 Examples

       ? gt_ascpos("the cat sat on the mat", 3) // prints e

Status

      Ready

 Files

      Library is libgt
      Library is libgt

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson