home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / TPSTR121.ZIP / TXTFMT.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1989-12-18  |  2.0 KB  |  48 lines

  1. program testformat;
  2. uses crt,strings;
  3. const lins=18;
  4.   s:array[1..lins] of string=(
  5.   'Did you know that an important aspect of the Iran/Contra affair has been',
  6.   'almost completely ignored in the press?  It''s not surprising, since this',
  7.   'particular aspect impugns the credibility of the US media, especially',
  8.   'with respect to its coverage of Latin American affairs and US foreign',
  9.   'policy in the region.  It seems the Reagan administration created a',
  10.   'domestic propaganda ministry, manned by former CIA psychological warfare',
  11.   'experts, with an aim to manipulate the public perception of events in',
  12.   'Latin America.  Most (not all) of the US media fell prey to (or cooperated',
  13.   'with) the administration''s efforts to cover up atrocities by the',
  14.   'Contras and the Salvadoran and Guatemalan governments.  This aspect of the',
  15.   'scandal was investigated by the congressional Iran/Contra committee, but',
  16.   'their findings were deleted in the final public report at the insistence of',
  17.   'congressional Republicans.  An excellent summary of the scandal can be',
  18.   'found in the Fall 1988 issue of _Foreign_Policy_, in "Iran-Contra''s',
  19.   'Untold Story," an article co-written by Newseek reporter Robert Parry.',
  20.   'The following issue''s letters section includes a letter corroborating',
  21.   'the article''s conclusions, signed by seven US congressmen.  Is this kind',
  22.   'of thing still happening?');
  23.  
  24. var t:string;
  25.     i,len,p:byte;
  26.  
  27. begin
  28.     len:=60;
  29.     while len<80 do begin
  30.        writeln(copies('----+',len div 5));
  31.        i:=0; t:='';
  32.        while i<lins do begin
  33.           while (length(t)<=len) and (i<lins) do begin
  34.              inc(i);
  35.              t:=t+s[i]+' ';
  36.           end;
  37.           while length(t)>len do begin
  38.              p:=lastpos(' ',t,len+1);
  39.              writeln(justify(left(t,p,' '),len));
  40.              t:=right(t,length(t)-p,' ');
  41.           end;
  42.        end;
  43.        writeln(t);
  44.        writeln('Press enter to continue ...'); readln;
  45.        len:=len+5;
  46.     end;
  47. end.
  48.