entity ch_18_08 is end entity ch_18_08; ---------------------------------------------------------------- architecture test of ch_18_08 is begin process is use std.textio.all; file f : text open read_mode is "ch_18_08.dat"; variable L : line; variable ch : character; variable s : string(1 to 5); variable i : integer; variable r : real; begin readline(f, L); read(L, ch); report character'image(ch); read(L, ch); report character'image(ch); readline(f, L); read(L, s); report '"' & s & '"'; read(L, s); report '"' & s & '"'; readline(f, L); -- code from book: if L'length < s'length then read(L, s(1 to L'length)); else read(L, s); end if; -- end of code from book report '"' & s & '"'; readline(f, L); read(L, i); report integer'image(i); read(L, r); report real'image(r); wait; end process; end architecture test; <div align="center"><br /><script type="text/javascript"><!-- google_ad_client = "pub-7293844627074885"; //468x60, Created at 07. 11. 25 google_ad_slot = "8619794253"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><br /> </div>