CT_VALPOS

 VALPOS()
 Determines the numerical value of the character at a particular position
------------------------------------------------------------------------------
 Syntax

     VALPOS(<cString>,[<nPosition>]) --> nAsciiValue

 Arguments

     <cString>  Designates any string.

     <nPosition>  Designates which character to convert into numeric data
     format.  The default value processes the last character.

 Returns

     VALPOS() returns the numeric value of the character at <nPosition>.

 Description

     VALPOS() converts a particular character in a string to its numerical
     equivalent.  You do not have to nest functions if you use VALPOS().

 Notes

     .  This function works a bit differently than the Clipper
        VAL() function.  VAL() terminates the conversion when a non-numeric
        character appears.  VALPOS() only processes a single character.

     .  If <nPosition> is past the end of <cString>, or the character
        selected through <nPosition> is not a number, VALPOS() returns 0.

 Example

     Determine the value of the character at position 3:

     cString  :=  "AX4B"
     ? VALPOS(cString, 3)      // Result: 4

See Also: ASCPOS()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.