Pupul of LIT 3 / 3 / 2 Регистрация: 27.10.2009 Сообщений: 37 |
||||
1 |
||||
16.11.2009, 17:21. Показов 16600. Ответов 2 Метки нет (Все метки)
Доброго дня суток! Делал прогу, вроде все правильно, вот код:
Но столкнулся с такой ошибкой, причем не компилируется только на моем компе, даже преподу давал, друзьям, все норм у них! А выдает вот что:
__________________
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
16.11.2009, 17:21 |
Ответы с готовыми решениями: I/o error 105
Ошибка I/O Error 105 interface uses Опять I/O Error 105 uses 2 |
Mawrat 13091 / 5872 / 1706 Регистрация: 19.09.2009 Сообщений: 8,808 |
||||
16.11.2009, 20:00 |
2 |
|||
Директиву компилятору надо дописать: {$APPTYPE CONSOLE} — чтобы это приложение как консольное компилировалось:
1 |
3 / 3 / 2 Регистрация: 27.10.2009 Сообщений: 37 |
|
16.11.2009, 20:43 [ТС] |
3 |
аааа, действительно, спасибо, по ходу удалил его как-то!
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
16.11.2009, 20:43 |
3 |
Posted by jpluimers on 2021/07/29
Since I always forget where to get the full list: there is none in the documentation. Only parts.
Usually the mapping is from run-time errors to exceptions:
In addition, exceptions are converted to run-time errors when the exception handling mechanism in the SysUtils
unit is not up.
This can happen early in start-up, or late un shut-down of an application.
The one I encountered most is the runtime error 216 during shutdown: it is an Access Violation (EAccessViolation).
Run-time errors (not changed since Delphi 2007)
- [WayBack] Delphi 2007: Exceptions
When an application uses the
SysUtils
unit, most runtime errors are automatically converted into exceptions. Many errors that would otherwise terminate an application – such as insufficient memory, division by zero, and general protection faults – can be caught and handled. - [WayBack] Delphi 2007: Delphi Runtime Errors
Runtime errors take the form:
Runtime error nnn at xxxxxxxx
where
nnn
is the runtime error number, andxxxxxxxx
is the runtime error address.Applications that use the SysUtils class map most runtime errors to Exceptions, which allow your application to resolve the error without terminating.
Delphi runtime errors are divided into the following categories:
- I/O errors, numbered 100 through 149
- Fatal errors, numbered 200 through 255
- Operating system errors
- [WayBack] Delphi 2007: I/O Errors
I/O errors cause an exception to be thrown if a statement is compiled in the
{$I+}
state. (If the application does not include theSysUtils
class, the exception causes the application to terminate).In the
{$I-}
state, the program continues to execute, and the error is reported by theIOResult
function.Number
Name
Description
100
Disk read error
Reported by Read on a typed file if you attempt to read past the end of the file.
101
Disk write error
Reported by CloseFile, Write, WriteIn, or Flush if the disk becomes full.
102
File not assigned
Reported by Reset, Rewrite, Append, Rename, or Erase if the file variable has not been assigned a name through a call to Assign or AssignFile.
103
File not open
Reported by CloseFile, Read Write, Seek, Eof, FilePos, FileSize, Flush, BlockRead, or BlockWrite if the file is not open.
104
File not open for input
Reported by Read, Readln, Eof, Eoln, SeekEof, or SeekEoln on a text file if the file is not open for input.
105
File not open for output
Reported by Write or Writeln on a text file if you do not generate a Console application.
106
Invalid numeric format
Reported by Read or Readln if a numeric value read from a text file does not conform to the proper numeric format.
- [WayBack] Delphi 2007: Fatal errors
Number
Name
Exception
200
Division by zero
EDivByZero
201
Range check error
ERangeError
202
Stack overflow
EStackOverflow
203
Heap overflow error
EOutOfMemory
204
Invalid pointer operation
EInvalidPointer
205
Floating point overflow
EOverflow
206
Floating point underflow
EUnderflow
207
Invalid floating point operation
EInvalidOp
210
Abstract Method Error
EAbstractError
215
Arithmetic overflow (integer only)
EIntOverflow
216
Access violation
EAccessViolation
217
Control-C
EControlC
218
Privileged instruction
EPrivilege
219
Invalid typecast
EInvalidCast
220
Invalid variant typecast
EVariantError
221
Invalid variant operation
EVariantError
222
No variant method call dispatcher
EVariantError
223
Cannot create variant array
EVariantError
224
Variant does not contain array
EVariantError
225
Variant array bounds error
EVariantError
226
TLS initialization error
No exception to map to.
227
Assertion failed
EAssertionFailed
228
Interface Cast Error
EIntfCastError
229
Safecall error
ESafecallException
230
Unhandled exception
No exception to map to.
231
Too many nested exceptions
Up to 16 permitted.
232
Fatal signal raised on a non-Delphi thread
No exception to map to.
For completeness, some DOS Borland/Turbo Pascal errors from [WayBack] where are the runtime error codes, eh? – delphi
Borland Pascal 7 runtime errors; most applicable to Delphi:
*** DOS ***
1 Invalid function number
2 File not found
3 Path not found
4 Too many open files
5 File access denied
6 Invalid file handle
12 Invalid file access code
15 Invalid drive number
16 Cannot remove current directory
17 Cannot rename across drives
18 No more files
*** I/O ***
100 Disc read error
101 Disc write error
102 File not assigned
103 File not open
104 File not open for input
105 File not open for output
106 Invalid numeric format read from file
*** CRITICAL ***
150 Write protected
151 Unknown unit/Bad drive request struct length
152 Drive not ready
153 Unknown command
154 CRC error in data
155 Bad drive request structure length
156 Disc seek error
157 Unknown media type
158 Sector not found
159 Printer out of paper
160 Device write fault
161 Device read fault
162 Hardware failure (C-DOS: file/device opened by another process)
*** FATAL ***
200 Division by zero
201 Range check
202 Stack overflow (on entry to a procedure or function)
203 Heap overflow (from New() or GetMem())
204 Invalid pointer operation (from Dispose() or FreeMem())
205 Floating point overflow
206 Floating point underflow
207 Invalid floating point operation
208 Overlay manager not installed (usually when calling OvrInit)
209 Overlay file read error
210 Object not initialized
211 Call to abstract method
212 Stream registration error
213 Collection index out of range
214 Collection overflow error
215 Arithmetic overflow error
216 General Protection fault
The run-time error 216
- [WayBack] Delphi Runtime error 216 thrown in SysUtils.FinaliseUnits, line number not in mapfile – Stack Overflow
- [WayBack] madshi.net • View topic – Runtime Error 216
–jeroen
This entry was posted on 2021/07/29 at 06:00 and is filed under Delphi, Development, Software Development.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Форум программистов Vingrad
Модераторы: Poseidon, Snowy, bems, MetalFan
Страницы: (2) [Все] 1 2 |
Поиск: |
|
Опции темы |
Штабс |
|
||
Unregistered
|
Пипл срочно надо избавиться от этой ошибки код вроде верный try AssignFile(f, FileName); Файл существует IO Error 105 что не так?! |
||
|
|||
Bes |
|
||
Опытный Профиль Репутация: 5
|
Подожди, т.е. теоретически возможна команда ReWrite без Assign-а?… |
||
|
|||
Штабс |
|
||
Unregistered
|
Ой прошу пардону AssignFile(f, FileName); Rewrite() отрабатывает ругань конкретно идет на WriteLn(f,BlaBlaBlaBlaBlaBlaBla) при Reset(f) при пошаговой трассировке F8 напоминаю 105 ошибка это невозможность открыть файл для записи AssignFile(f, FileName) OK структура отработала (т.е. существующий файл получил указатель и открыт для работы) WriteLn(f,BlaBlaBlaBlaBlaBlaBla) IO Error 105 PS кстати аналогичное построение с $I- …. $I+ результат аналогичный |
||
|
|||
Bes |
|
||
Опытный Профиль Репутация: 5
|
Че-то я не пойму: try а почему отрабатывает Rewrite(f) ; т.е. для чтения он открытьсяне может? далее WriteLn(f,BlaBlaBlaBlaBlaBlaBla) Мне кажется но все-таки открывается для чтения и ругается при попытке записать что-либо в него, что вообщем-то естественно. |
||
|
|||
devmstr |
|
||
Developer Профиль
Репутация: 2
|
Если хочешь писать пиши:
[s] ——————— Think different ©Steve Jobs |
||
|
|||
Vit |
|
||
Vitaly Nevzorov Профиль
Репутация: 48
|
f — какого типа? ——————— With the best wishes, Vit |
||
|
|||
Zero |
|
||
Эксперт Профиль
Репутация: 8
|
Собственно по ошибкам в/в, можно исп. дерективы компилятора {$I-} и {$I+}
Имхо, тип здесь не играет особой роли… |
||
|
|||
Vit |
|
||
Vitaly Nevzorov Профиль
Репутация: 48
|
Считаешь что мне делать нечего? ——————— With the best wishes, Vit |
||
|
|||
Vit |
|
||
Vitaly Nevzorov Профиль
Репутация: 48
|
Ошибка в общем-то проста и очевидна, я не зря про тип спрашивал, не совсем был уверен, хотя и догадывался откуда ноги растут, сейчас добрался до Дельфи проверил… Вот код:
Если этот код запустить, и файл ‘c:myfile.txt’ существует, то получим эту самую ошибку 105. Почему? До потому что reset не открывает текстовые файлы на запись! только на чтение. Для записи текстовый файл должен быть открыт только rewrite или append. Вот и все проблемы! ——————— With the best wishes, Vit |
||
|
|||
Bes |
|
||
Опытный Профиль Репутация: 5
|
Об чем и говорим на каждом собрании… |
||
|
|||
Штабс |
|
||
Unregistered
|
Только что вернулся от заказчика…. и так Директивы компилятора {$I} позволяют отлавливать Error Code 105 относится к расширенной таблице ошибок Если этот код запустить, и файл ‘c:myfile.txt’ существует, то получим эту самую ошибку 105. Почему? До потому что reset не открывает текстовые файлы на запись! только на чтение. Для записи текстовый файл должен быть открыт только rewrite или append. Вот и все проблемы! спасибо VIT |
||
|
|||
Vit |
|
||
Vitaly Nevzorov Профиль
Репутация: 48
|
——————— With the best wishes, Vit |
||
|
|||
devmstr |
|
||
Developer Профиль
Репутация: 2
|
Vit ——————— Think different ©Steve Jobs |
||
|
|||
Zero |
|
||
Эксперт Профиль
Репутация: 8
|
Извени Vit, нехотел тебя обидеть, до меня и до самого сразу недошло что от типа многое зависит, покрайней мере в данном случае… Это сообщение отредактировал(а) Zero — 17.12.2004, 23:35 |
||
|
|||
Vit |
|
||
Vitaly Nevzorov Профиль
Репутация: 48
|
——————— With the best wishes, Vit |
||
|
|||
кварк |
|
||
Шустрый Профиль Репутация: нет
|
Извините, что вcтреваю, но зачем Assign? tf: TextFile; {$I-} Rewrite — то же самое. Аррend’у почему-то нужен assign. P.S. Всегда был в этом уверен, только что полез в справку и не нашел упоминаний об этом. Но работает еще с ТР: у меня даже в шаблон это забито P.P.S. Это сообщение отредактировал(а) кварк — 20.12.2004, 14:35 |
||
|
|||
Страницы: (2) [Все] 1 2 |
|
Правила форума «Delphi: Общие вопросы» | |
|
Запрещается! 1. Публиковать ссылки на вскрытые компоненты 2. Обсуждать взлом компонентов и делиться вскрытыми компонентами
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Snowy, MetalFan, bems, Poseidon, Rrader. |
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) |
0 Пользователей: |
« Предыдущая тема | Delphi: Общие вопросы | Следующая тема » |
|
|
|
RunTime Error 105
, (разделено)
- Подписаться на тему
- Сообщить другу
- Скачать/распечатать тему
|
|
Newbie Рейтинг (т): нет |
Люди хелпните, мне 14 лет токо начал заниматься програмированием, вот увидел пользу паскаля… када пишу в поиске адрес ошибки мне выделяет строку хотя там вроде ошибок нету блин!!!! Эта тема была разделена из темы «ЧАВО+» |
KiRiK |
|
Senior Member Рейтинг (т): 25 |
Хм.. что это у тебя за IDE такая? |
Булат Шакиров |
|
Работаешь в BPW? А Uses WinCRT Кто будет ставить? |
AVA12 |
|
Цитата Run-time error 105: File not open for output This error occurs if you try to use standard input and output functions like Readln and Writeln without the Uses WinCRT; statement. To correct this error, add Uses WinCRT; to your program. © Borland Pascal Help (bpw.hlp). |
zJIoy4eJI |
|
Newbie Рейтинг (т): нет |
А по подробнее, как код будет выглядеть??? |
Булат Шакиров |
|
zJIoy4eJI Uses WinCrt; {Твой код здесь} |
zJIoy4eJI |
|
Newbie Рейтинг (т): нет |
То есть Цитата
Uses WinCrt; да? и это при аждом использовании оператора Writeln И readln ??? Добавлено 19.09.06, 12:17 Цитата program E1; Добавлено 19.09.06, 12:31 |
volvo877 |
|
Moderator Рейтинг (т): 878 |
zJIoy4eJI, program E1; Uses WinCrt; var a,d,c: real; begin writeln(‘Введите длины трех сторон треугольника’); readln(a,d,c); write (‘Треугольник со сторонами ‘, a,d,c); if(a + d > c) and (d + c > a) and (c + a > d) then writeln (‘сушествует’) else writeln (‘не сушествует’) end.
все-таки, иначе компилятор тебя не поймет |
zJIoy4eJI |
|
Newbie Рейтинг (т): нет |
вот вот я так и сделал Добавлено 19.09.06, 12:53 Добавлено 19.09.06, 12:58 |
e-moe |
|
Цитата zJIoy4eJI @ 19.09.06, 12:49 знак делить это / ???
да конечно |
zJIoy4eJI |
|
Newbie Рейтинг (т): нет |
Цитата e-moe @ 19.09.06, 13:32 Цитата zJIoy4eJI @ 19.09.06, 12:49 знак делить это / ???
да конечно А теперь обьясни тупому 9-и класснику что озночает целочислительское деление?? |
Anykey |
|
Full Member Рейтинг (т): 26 |
Цитата zJIoy4eJI @ 19.09.06, 13:41 А теперь обьясни тупому 9-и класснику что озночает целочислительское деление?? Выдает только целую часть от деления |
volvo877 |
|
Moderator Рейтинг (т): 878 |
Цитата zJIoy4eJI @ 19.09.06, 13:41 что озночает целочислительское деление?? Деление, когда делимое, делитель и частное — целые числа… Var i, j: integer; begin i := 7; j := i / 2; { <— Ошибка } j := i div 2; { <— Правильно} end. |
Alex_Speaker |
|
zJIoy4eJI, |
0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
0 пользователей:
- Предыдущая тема
- Pascal
- Следующая тема
[ Script execution time: 0,0659 ] [ 15 queries used ] [ Generated: 10.02.23, 01:55 GMT ]