David C. Hoos, Sr. a �crit dans le message ... >If you want to have the tags in the stream (so that the specific >types can be distinguished when reading back), you need to use: >Data'Class'Output(Str, Data_Pointer.all); > >Then, to read them back, you would say: >Data_Pointer := new Data'Class'(Data'Class'Input (str)); > >That statement allocates memory for the object, and initializes it >with the value read from the stream. > That's correct, but note that it is not necessary to use pointer under Ada95. Data'Class'Output (Str, Object); (with Object whatever instance in the class heriachy). New_Object : constant Data'Class := Data'Class'Input (Str); Pascal. --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://ourworld.compuserve.com/homepages/pascal_obry --| --| "The best way to travel is by means of imagination"