This example shows one value of one of the numbers
in the decode1 example and how it is processed and stored, from start to finish.
-- Types and functions:
subtype Str4 is String(1 .. 4)
function INT_TO_STR4 is new unchecked_conversion(Integer, Str4);
-- DATAFLOW: Values are shown indented, in various forms.
-- Data transformations are shown in column 1
One of the integers from the file decode1.txt,
9 ASCII characters, as rendered by editor:
541682976
72 bits show how that number is actually stored in the file (spaces added for readability):
0011 0101 0011 0100 0011 0001 0011 0110 0011 1000 0011 0010 0011 1001 0011 0111 0011 0110
hex version of bits that are stored:
35 34 31 36 38 32 39 37 36
i: Integer
GET(i)
Contents of i:
32 bits that are actually stored (spaces added for readability):
0010 0000 0100 1001 0110 1101 0010 0000
hex version of bits that are stored
20 49 6D 20
s4: Str4 := INT_TO_STR4(i)
Contents of s4 (which are identical to i at the bit level)
32 bits that are actually stored (spaces added for readability):
0010 0000 0100 1001 0110 1101 0010 0000
hex version of bits that are stored
20 49 6D 20
PUT("<" & s4 & ">");
Output from put command (ie printed as string with <> to show blanks):
< Im >