Thank you Dennis for this explanation. This is an answer to my original question.

To know what is recognized as a number, someone should specify the grammar for 
such constants, and then there's something to QA against.

From what I see the grammar includes 'D' as a valid exponent marker, as type conversion functions recognize 'D' as an exponent.  Thus nothing to QA on the side of 'isnumeric'.

However, after the tests I ran I discovered the following, which on my opinion should be considered as bugs :
-  CDbl("123E456")  and CDbl("123D456") which enter an infinite loop,
- CDec("123E456") and CDec("123D456") which should raise an overflow instead of returning 0

yours faithfully,
Lucien

Le 23/06/22 à 18:57, [email protected] a écrit :
Lucien asked,

" Is that a relic from prehistoric ages ?"

Yes.

E was the original exponent marker for what we would now call float values.

D was added to distinguish double from (single-precision) float.

This had nothing to do with (Visual) Basic (for Applications) originally.

To know what is recognized as a number, someone should specify the grammar for
such constants, and then there's something to QA against.

  - Dennis

-----Original Message-----
From: Lucien Mathay<[email protected]>
Sent: Thursday, June 23, 2022 08:12
To:[email protected]
Subject: Re: isnumeric function



Le 23/06/22 à 16:23, Dave a écrit :
Like Pedro, I can replicate your issue, but cannot explain it, other
than to say it might be that the function is seeing 123D456 as a Hex
value, which equates to Decimal 19.125.334.

Dave,

the problem then is that 'A', 'B', 'C' and 'F' are not accepted

Only 'D' and 'E' are accepted :
- 'E' probably stands for Exponent, thus is should be valid character in the
numeric string
- 'D' : something like "Decimal" ?
[orcmid] [ ... ]

- I note that msgbox ("123D-456") also returns True : 'D' seems thus to behave
like an exponent.

Power of 10 maybe ?

- lets test msgbox("123D3")   : it prints out 123000  ;  it seems thus
perfectly equivalent to "123E3"
Note that msgbox CDbl("123D3") does not loop but prints out 123000

Is that a relic from prehistoric ages ?

Lucien.

---------------------------------------------------------------------
To unsubscribe, e-mail:[email protected]
For additional commands, e-mail:[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail:[email protected]
For additional commands, e-mail:[email protected]

Reply via email to