ASSIGNFILE

Материал из Фабиус wiki
Перейти к: навигация, поиск

AssignFile - это функция, описанная в файле QrAddFn.pas

AssignFile( <filename> )

По имени файла возвращает файловую переменную

Примеры

_file := AssignFile( path + name )
parameters path, name, str_line
local aa, log_file
aa := {} 
try
  log_file := AssignFile( path + name )
  if Empty( log_file )
    return
  endif
  TextReset( log_file )
  while !TextEof( log_file )
    Aadd( aa, ReadLn( log_file ) )
  end
finally
  if !Empty( log_file )
    CloseFile( log_file )
  endif
end
Aadd( aa, Date() + ' ' + Time() + ' ' + str_line ) 
WriteTxtFile( aa, name, path, true )