PETERSC1%VUENGVAX.BITNET@CUNYVM.CUNY.EDU (03/23/88)
When I need to do this (at least in Turbo, I use a case statement wherever necessary like this: case out_spec of 's','S' : begin assign(fd,'CON:'); rewrite(fd); end; 'p','P' : begin assign(fd,'LST:'); rewrite(fd); end; 'f','F' : begin assign(fd,file_name); rewrite(fd); end; end; (* case statement *) then just use fd wherever I need to write to one or another of the files (CON:, LST:, or file_name) (i.e. writeln(fd,' fun stuff!');)... -Chris Petersen Vanderbilt University Microcomputer Lab / Dept. of Pathology