[log in to unmask] wrote:
> 1) A type definition
> 2) Two derivired types from the first
> 3) A rep-spec for each of the derived types
> 4) Two instantians of ENUMERATION_IO.
> 5) One assigment statement to up-convert and then down-covert.
> and you hvae your program.
If I understand correctly, you're talking about converting something like
type T1 is (A, B, C);
for T1 use (A => 1, B => 2, C => 4);
into something like
type T2 is (A, B, C);
for T2 use (A =>1, B => 3, C => 7);
In that case, it's even easier than you said:
type T1 is (A, B, C);
for T1 use (A => 1, B => 2, C => 4);
type T2 is new T1;
for T2 use (A =>1, B => 3, C => 7);
V : T1;
...
Get (V);
Put (T2 (V) );
--
Jeff Carter
"I was hobbling along, minding my own business, all of a
sudden, up he comes, cures me! One minute I'm a leper with
a trade, next minute my livelihood's gone! Not so much as a
'by your leave!' You're cured, mate. Bloody do-gooder!"
Monty Python's Life of Brian
76
|