comp.lang.ada
 help / color / mirror / Atom feed
* Character/Integer Conversion
@ 2000-03-31  0:00 ebresie
  2000-04-02  0:00 ` DuckE
  2000-04-03  0:00 ` David
  0 siblings, 2 replies; 9+ messages in thread
From: ebresie @ 2000-03-31  0:00 UTC (permalink / raw)


I am sure this is a simple thing, but I am doing the following...

I need to create a string of character which will be sent to a scsi
interface.

I need to convert from a character into a integer so that I can make a
checksum.

I am giving a basic code version...not verbatum

msg : string(1..length);

msg(1) := '~';  -- how do I get the asci value for this character?
msg(2)  := 33;
msg(3)   : msg(1)'value + msg(2)'value;

this should more or less add the ascii value of the first character with
the value of the second.

Any help would be appreciated.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-04-05  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-31  0:00 Character/Integer Conversion ebresie
2000-04-02  0:00 ` DuckE
2000-04-03  0:00 ` David
2000-04-03  0:00   ` Robert Dewar
2000-04-04  0:00     ` Robert A Duff
2000-04-05  0:00       ` Robert Dewar
2000-04-03  0:00   ` Robert Dewar
2000-04-04  0:00     ` Mats Weber
2000-04-05  0:00       ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox