Показать сообщение отдельно
Старый 25.07.2007, 17:14   #11  
InTacto is offline
InTacto
Участник
Аватар для InTacto
 
323 / 11 (1) +
Регистрация: 09.08.2005
Если получать доступ к файлам через тип данных File, то у фукции Open есть возвращаемый параметр true/false. И можно отследить прошло ли открытие файла. Например

if not(file1.open('путь')) then
  message('файл не существует');

Еще справка по этой функции из Нава:

Use this function to open an existing ASCII or binary file. As compared to CREATE (File), this function does not create the file if it does not exist.

[Ok]:= File.OPEN
Ok

Data type: boolean

If you omit this optional return value, a run-time error occurs if the system cannot find the file. If you include a return value, you must handle any errors. The possible values are:

If Ok is...
It means the file was...
TRUE Opened
FALSE Not opened (does not exist)

File

Data type: file

Use this variable to refer to the file.