chr() vs Chrw()

mwightman

Member
Joined
Aug 18, 2007
Messages
9
Programming Experience
10+
I can not find any documentation on this but would like some verification.

This version works
private const A as char=chrw(128)


This version will not compile
private const A as char=chr(128)


I am assuming that chr() function is a vb compatibility function not a true language element so it can not be optimized and used as a constant.
 
What character does chrw(128) produce? You may be able to use the Keys enum to set the key without using chrw()
 
I can not find any documentation on this but would like some verification.

This version works
private const A as char=chrw(128)


This version will not compile
private const A as char=chr(128)


I am assuming that chr() function is a vb compatibility function not a true language element so it can not be optimized and used as a constant.

chr and chrw accepts the char code in its argument and return the respective character that corresponds to that charcode . It is opposite to Asc and Ascw function that return the ascii code of character given them as arguments.

Example :-
msgbox(chrw(122)) :- Returns 'z' character
 
Back
Top