Chr() vs ChrW() and Const ...

  • Thread starter Thread starter Joe Duchtel
  • Start date Start date
J

Joe Duchtel

Hello -

I was wondering why I can do a ...
Public Const A As Char = Chr(36)
.... but not a ...
Public Const B As Char = Chr(165)?

It seems like 0-127 are okay with the Chr(). Is this because values >
127 depend on the currently active code page and hence are dynamic?

I also had a case where a Chr(146) would match a character in a string
but a ChrW(146) would not. I would expect both of these calls to
return the same character. Could the reason be how I compare
strings? I think I used the equal operator instead of .Equals().

How do the Chr() and ChrW() functions work differently?

Thanks,
Joe
 
Hello Joe,

if you move the cursor to Chr or ChrW and press F1 you will find the
online help on your screen which covers exactly that subject (in the
"Remarks" section).

Best regards,

Martin


Am 13.05.2008 22:07, schrieb Joe Duchtel:
 
Hello -

I tried the Chr,ChrW Functions Visual Basic Language Reference and was
just a little bit confused. I guess I just have to mull it a little
more ...

Thanks!
Joe
 
Back
Top