[Mono-list] conversions

Polton, Richard (IT) Richard.Polton@morganstanley.com
Wed, 29 Sep 2004 09:05:29 +0100


Hi,

The code is in

mcs-1.0.1/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Conversion.c
s

at line 687

The particular piece I noticed is

return Expression - '0';

Richard

-----Original Message-----
From: Jambunathan Jambunathan [mailto:kjambunathan@novell.com]=20
Sent: 26 September 2004 14:31
To: mono-list@lists.ximian.com; Polton, Richard (IT)
Subject: Re: [Mono-list] conversions

Hey Richard

This is definitely odd.=20

Could you point us to the offending code or better still could you
please submit a test report in bugzilla with a test case.

Regards,
Jambunathan  K.

>>> Richard Polton <Richard.Polton@morganstanley.com> 09/24/04 4:04 PM
>>>
Hi,

I was browsing the source code for Conversions.cs (or similar) in the
VisualBasic (I think) package in 1.0.1 and came across a couple of
oddities. The one which struck me in particular was the conversion of a

single character into a numeric type. It was performed by subtracting
the absolute character '0' from the function parameter. This will only

work if the input character set is known to be ASCII or known to be
ordered in the same way? So, my question is, is it a requirement of all

.NET (and Mono) applications that the character set used is ASCII or
similar? I know the spec refers to the program as being encoded in
Unicode but I couldn't find anything regarding the recognisable input
chars.

Richard
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list=20
--------------------------------------------------------
=20
NOTICE: If received in error, please destroy and notify sender.  Sender =
does not waive confidentiality or privilege, and use is prohibited.=20
=20