*/
Love this site? Hate it? Leave us some comments.
*/

View SAMPLES\FILECOPY.PAS

Portable ISO Standard Pascal in C, version 3.8

Submitted By: WEBMASTER
Rating: starstarstarstar (Rate It)


(*$c+*)
PROGRAM File_copy(prd, prr);
{ prd AND prr must match command line file specifiers
  with "prr" and "prd" in their path names, either as
  suffixes (.prr, .prd), prefixes, or entire names. If
  you plan to copy long files with this program, or you
  do not want to view the copied file as it is copied,
  put comment markers around the `WRITE(current);' and
  `WRITELN;' statements. }

VAR     current : char;
        prr, prd : text;
BEGIN
RESET(prd); REWRITE(prr);
 WHILE NOT EOF(prd) DO
  BEGIN
   WHILE NOT EOLN(prd) DO
    BEGIN
     READ(prd, current);
     WRITE(current);
     WRITE(prr, current)
    END; {eoln loop}
   READLN(prd); WRITELN; WRITELN(prr)
  END {eof loop}
END. {File_copy}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.