쓰기 실패를 위해 Open을 사용하여 파일을 열려고 시도하는 이유는 무엇입니까? ADA 95
문제
쓸 파일을 열려고 할 때 ada.io_exceptions.name_error를 얻습니다.
절차 호출입니다 ada.text_io.open
파일 이름은 "c : cc_test_log.txt"입니다. 이 파일은 존재하지 않습니다.
이것은 NTFS 파티션의 Windows XP에 있습니다. 사용자는 디렉토리를 작성하고 쓸 권한이 있습니다. 파일 이름은 Win32 Max 경로 길이 아래에 있습니다.
name_2 : String := "C:\CC_TEST_LOG.TXT"
if name_2'last > name_2'first then
begin
Ada.Text_IO.Open(file, Ada.Text_IO.Out_File, name_2);
Ada.Text_IO.Put_Line(
"CC_Test_Utils: LogFile: ERROR: Open, File "
& name_2);
return;
exception
when The_Error : others =>
Ada.Text_IO.Put_Line(
"CC_Test_Utils: LogFile: ERROR: Open Failed; "
& Ada.Exceptions.Exception_Name(The_Error)
& ", File " & name_2);
end;
end if;
제휴하지 않습니다 StackOverflow