1. DUMB question

------=_NextPart_000_0021_01BBFF60.62BE42C0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Ok, slap me guys, but I cant remember this for the life of me (possibly =
I never knew it, that happens sometimes :-} ), but how do u find the =
ASCII value of a character?  Is it direct assignment?=20
ex.
atom x
integer y

x=3D'C'
y=3Dx
-- Now does y =3D ASCII value of 'C'?

Thanx for any help

Adam Weeden
WeedenSoft Technologies

------=_NextPart_000_0021_01BBFF60.62BE42C0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Ok, slap me guys, but I cant =
remember this for=20
the life of me (possibly I never knew it, that happens sometimes :-} ), =
but how=20
do u find the ASCII value of a character?&nbsp; Is it direct assignment? =

</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>ex.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>atom x</FONT></DIV>
<DIV><FONT size=3D2>integer y</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>x=3D'C'</FONT></DIV>
<DIV><FONT size=3D2>y=3Dx</FONT></DIV>
<DIV><FONT size=3D2>-- Now does y =3D ASCII value of 'C'?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thanx for any help</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Adam Weeden</FONT></DIV>

------=_NextPart_000_0021_01BBFF60.62BE42C0--

new topic     » topic index » view message » categorize

2. Re: DUMB question

the easiest way is simply:

atom char
char = 't' -- ascii value 116
char += 1 -- ascii value 117, the letter 'u'


Characters are always stored as their ascii value.  For example, the
string "test" is actually a sequence:
{116,101,115,116}

So, in your example, y does equal the ascii value of 'C', but so does x.


 Greg

Adam Weeden wrote:

>  Ok, slap me guys, but I cant remember this for the life of me
> (possibly I never knew it, that happens sometimes :-} ), but how do u
> find the ASCII value of a character?  Is it direct assignment?ex.atom
> xinteger y x='C'y=x-- Now does y = ASCII value of 'C'? Thanx for any
> help Adam WeedenWeedenSoft Technologies

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu