|
|||
Скачать Определение переназначения вывода в файл
19.01.1994 Тут недавно пробегала проблемка subj, и было предложено решение. -------8<--------------------------------------------------------------- (* From: "Kirill V. Karpov" { Here's a neat little ditty I converted from a C++ tip I saw in a mag a few years ago. It tests to see if its own output has been redirected and returns a 1 if TRUE (redirected) or a 0 if FALSE (not redirected). This function includes a sample prog that demonstrates its use. SIDE NOTE: I put this function in the U_FILE.pas.tpu for use with all of my home-grown file related functions and procedures. TEST WITH: Test_Red (enter) [you should see a NOT REDIRECTED msg, 10 lines and a FINISHED msg.] TEST WITH: Test_Red > this.dat (enter) [you should see a REDIRECTED msg, (no lines) and a FINISHED msg and the output of the lines will be in the this.dat file] } program test_red; {$A+,B-,D-,E-,F-,G-,I+,L-,N-,O-,P-,Q-,R-,S+,T-,V+,X-} {$M 1024,0,655360} | |||
© 2009–2024 Russian Pascal Developer Network.
Техническая площадка: ISBIZ Хостинг |