title: FoxPro functions which determine if a variable is a character string or a numeric string
body: <p>I'm looking for a Visual FoxPro function which is similar to the PHP function <a href="http://php.net/manual/en/function.is-numeric.php" rel="nofollow noreferrer">is_numeric()</a>.<br>
  I have found <a href="https://stackoverflow.com/questions/7563907/function-to-know-that-a-variable-is-string-or-number-on-foxpro">this</a>, but I could not use <code>VARTYPE</code> or <code>TYPE</code> because the variable is always a character string which contains digits only.</p>
  
  <p>I found <code>ISDIGIT()</code> function, but the manual says that it only checks the first character.</p>
  
  <blockquote>
    <p>Determines whether the leftmost character of the specified character
    expression is a digit (0 through 9).</p>
  
  <pre><code>  ISDIGIT(cExpression)
  </code></pre>
    
    <p><strong>Parameters</strong><br>
       <em>cExpression</em> </p>
    
    <p>Specifies the character expression that ISDIGIT( ) tests. Any
    characters after the first character in cExpression are ignored.</p>
  </blockquote>
  
  <p>I would create my own function using the regular expression object <code>VBScript.RegExp</code></p>
  
  <pre><code>FUNCTION isNumeric( tcValue )
      LOCAL oRE
      oRE = CreateObject("VBScript.RegExp")
      oRE.Pattern = '^[0-9]+$'
      RETURN oRE.test( tcValue )      
  ENDFUNC
  
  ? isNumeric( '123' )
  </code></pre>
  
  <p>But, is there any function provided by FoxPro for this purpose?<br>
  Am I just overlooking?</p>
  
  <p>Also same for <code>ISALHPA()</code> which determines whether the leftmost character in a character expression is alphabetic. I want to check if the variable contain only alphabets.</p>