|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, function Capitalize, seg_005635
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
function Capitalize (Sin : String) return String is
------------------------------------------------------------------------------
-- Sin - Specifies the string to be capitalized
--
-- Capitalize the input string. Each "word" in the string is capitalized.
-- The first letter is upper-case and the rest is lower.
------------------------------------------------------------------------------
Sout : String (Sin'Range);
Sini : Natural := Sin'First;
begin
loop
if Sini > Sin'Last then
return Sout;
end if;
loop
if Sin (Sini) in 'a' .. 'z' then
----Upper-case the first letter in a word.
Sout (Sini) := Character'Val
(Character'Pos (Sin (Sini)) -
(Character'Pos ('a') - Character'Pos ('A')));
Sini := Sini + 1;
exit;
elsif Sin (Sini) in 'A' .. 'Z' or else
Sin (Sini) in '0' .. '9' then
Sout (Sini) := Sin (Sini);
Sini := Sini + 1;
exit;
else
Sout (Sini) := Sin (Sini);
Sini := Sini + 1;
if Sini > Sin'Last then
return Sout;
end if;
end if;
end loop;
if Sini > Sin'Last then
return Sout;
end if;
loop
if Sin (Sini) in 'A' .. 'Z' then
----Lower-case the rest of the word.
Sout (Sini) := Character'Val
(Character'Pos (Sin (Sini)) -
(Character'Pos ('A') - Character'Pos ('a')));
Sini := Sini + 1;
if Sini > Sin'Last then
return Sout;
end if;
elsif Sin (Sini) in 'a' .. 'z' or else
Sin (Sini) in '0' .. '9' then
----Lower-case the rest of the word.
Sout (Sini) := Sin (Sini);
Sini := Sini + 1;
if Sini > Sin'Last then
return Sout;
end if;
else
----New word begins.
Sout (Sini) := Sin (Sini);
Sini := Sini + 1;
exit;
end if;
end loop;
end loop;
end Capitalize;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=18 rec1=00 rec2=01 rec3=038
[0x01] rec0=00 rec1=00 rec2=04 rec3=00e
[0x02] rec0=19 rec1=00 rec2=02 rec3=032
[0x03] rec0=12 rec1=00 rec2=03 rec3=000
tail 0x21500a38a81978d4996ea 0x42a00088462063203