input_case nil$ % Working with files % ------------------ in "f1.red"; % further input comes from f1.red a; % now input comes from the terminal cont; % continuing input from the file % file should end by the command end; in "f1.red"$ % operators, being read from the file, are not echoed off nat,pri,echo; % input from the terminal again % pri - apply PRInt formatting. % off pri; - expressions are printed % in a form, close to internal one (to save time) out "f2.red"; % further output goes to f2.red a:=x*y^2*z^3; b:=1/a; out t; % t - terminal on nat,pri,echo; a; b; clear a,b; off nat,pri,echo; out "f2.red"; % continuing output to the file write "end"; shut "f2.red"; % closing output file on nat,pri,echo; % now output goes to the terminal in "f2.red"; % input from the newly created file a; b; clear a,b; % input from the terminal again end;