Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:03:01+00:00 2026-06-15T23:03:01+00:00

I’m looking for a Visual FoxPro function which is similar to the PHP function

  • 0

I’m looking for a Visual FoxPro function which is similar to the PHP function is_numeric().
I have found this, but I could not use VARTYPE or TYPE because the variable is always a character string which contains digits only.

I found ISDIGIT() function, but the manual says that it only checks the first character.

Determines whether the leftmost character of the specified character
expression is a digit (0 through 9).

  ISDIGIT(cExpression)

Parameters
cExpression

Specifies the character expression that ISDIGIT( ) tests. Any
characters after the first character in cExpression are ignored.

I would create my own function using the regular expression object VBScript.RegExp

FUNCTION isNumeric( tcValue )
    LOCAL oRE
    oRE = CreateObject("VBScript.RegExp")
    oRE.Pattern = '^[0-9]+$'
    RETURN oRE.test( tcValue )      
ENDFUNC

? isNumeric( '123' )

But, is there any function provided by FoxPro for this purpose?
Am I just overlooking?

Also same for ISALHPA() which determines whether the leftmost character in a character expression is alphabetic. I want to check if the variable contain only alphabets.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:03:02+00:00Added an answer on June 15, 2026 at 11:03 pm

    You can create your own function like this.

    FUNCTION IsAllDigits
        LPARAMETERS tcSearched, tcOptionalSearch
    
        * tcSearched = the string of characters to test.
        * tcOptionalSearch = optional, additional characters to allow.
    
        LOCAL lcSearch
        m.lcSearch = "01234567989" + IIF(VARTYPE(m.tcOptionalSearch) = "C", m.tcOptionalSearch, "")
    
        LOCAL lcRemaining
        m.lcRemaining = CHRTRAN(m.tcSearched, m.lcSearch, "")
    
        RETURN ( LEN(m.lcRemaining) = 0 )
    ENDFUNC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
This could be a duplicate question, but I have no idea what search terms
this is what i have right now Drawing an RSS feed into the php,
I have a jquery bug and I've been looking for hours now, I can't
I want to count how many characters a certain string has in PHP, but
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have an autohotkey script which looks up a word in a bilingual dictionary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.