Oops, I guess I misread the intent of the original line; I thought you were just checking to see if the line could be a number, and were interested in a more efficient way to quickly test it without a lot of overhead. And, actually, the 'quickie' test with Asc will even allow you to put comments after the number in the file, whereas the original call to IsNumber() would - I believe - fail if there were extra non-numeric characters after the 1st numeric character, so:

1 // <- translates to 'Case 1'

would pass with the Asc() test, but would fail on the IsNumber() test (I think - I haven't actually tried it myself.) Of course, I didn't try the perl test either; not being a perl fan myself. Granted, this approach, while allowing comments, doesn't necessarily define what the comment character is!

On Dec 9, 2006, at 9:31 AM, Kem Tekinay wrote:

On 12/9/06 9:58 AM, William Squires at [EMAIL PROTECTED] wrote:

How about:

If (Asc(line) >= 48) And (Asc(line) <= 57) Then

No good as one of the text lines might start with an integer. I needed to
know if the *whole* line was comprised of integers.

I could have split the string and put that code in a loop, I guess, but I
assume there will be a penalty there too. I'll try it and report back.

______________________________________________________________________ ____ Kem Tekinay (212) 201-1465 MacTechnologies Consulting Fax (914) 242-7294 http://www.mactechnologies.com Pager (917) 491-5546

To join the MacTechnologies Consulting mailing list, send an e- mail to:
           [EMAIL PROTECTED]






_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to