RosettaCodeData/Task/Rot-13/PL-I/rot-13.pli

18 lines
547 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
rotate: procedure (in) options (main); /* 2 March 2011 */
declare in character (100) varying;
declare line character (500) varying;
declare input file;
open file (input) title ('/' || in || ',type(text),recsize(500)' );
on endfile (input) stop;
do forever;
get file (input) edit (line) (L);
line = translate (
line, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm');
put edit (line) (a); put skip;
end;
end;