Casting E detail
Mark S. Miller
markm@erights.org
Thu, 28 Jan 1999 11:30:07 -0800
At 05:52 AM 1/28/99 , shapj@us.ibm.com wrote:
>This is not a simple question, because the answer to "what is a char?" is
>not a simple question.
>
>There are a couple of converters in Java, depending on character set.
Whenever possible, including this case, E attempts to provide a simple
answer. In this case, it's the same as the default simple answer in Java:
just convert according to unicode. Given that "i" is an integer (or in
Java, an int), the equivalent of Java's
(char)i
in E is
i asChar
Similarly, given that "c" is a char, the equivalent of Java's
(int)c
in E is
c asInteger
as documented in http://www.erights.org/elang/integer-ref.html and
http://www.erights.org/elang/char-ref.html respectively.
In E, all character actors are method actors,
--MarkM