Re: Test not working so well

[email protected] (ToddAndMargo via perl6-users)
Newsgroups perl.perl6.users
Message-ID <[email protected]>
On 12/11/23 13:39, ToddAndMargo via perl6-users wrote:
> On 12/11/23 00:55, Kevin Pye wrote:
>> Seriously Todd? "What is a digit?" The characters '0' to '9' are digits.
>>   (Unicode probably has a whole lot of others, but those will do for the
>> moment.)
> 
> Yes seriously.  Does '9' have the ascii value of 57 or the
> binary value of 9?  Or do you mean a single character?
> Would 'a' also be a digit?  Or are digits limited to
> ascii 48 to 57 or binary 0 to 9?

Maybe this will make more sense to my question:

[0] > say chr(57)
9

[0] > say ord("9")
57

I am dealing with a string, which is a collection of
characters.  `"9"` in not a number.  It is a character
(ascii 57) that "looks" like a number to the human eye.
This is why I wanted to know what you meant by "digit".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.