View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0036122 | FPC | Documentation | public | 2019-09-30 21:53 | 2019-10-01 20:19 |
Reporter | Thaddy de Koning | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.3.1 | Product Build | |||
Target Version | Fixed in Version | 3.3.1 | |||
Summary | 0036122: InOutRes is documented as read-only, but it isn't and also isn't meant to be read-only | ||||
Description | InOutRes is documented as read-only, but it isn't and also isn't meant to be read-only! https://www.freepascal.org/docs-html/rtl/system/inoutres.html InOutRes is even used in the RTL as writeable (107) Ranges above 255 may be considered usermode errors? (not sure) Errors are linked to categories: type DosErrors = 2..99; IOErrors = 100..149; FatalErrors = 150 ..199; CompilerErrors = 200..255; CustomErrors = 256..High(word); | ||||
Steps To Reproduce | program testInOutRes; {$I-} var s:string = ' FreePascal'; begin if s = ' Einstein' then InOutRes := $dead; // a free slot above 1000 writeln(IOResult,s); end. | ||||
Additional Information | This has always been writeable and I have seen and used it in production code. It is the old man's equivalent of manual Raise.... | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 1662 | ||||
FPCOldBugId | |||||
FPCTarget | 3.2.0 | ||||
Attached Files |
|
|
It may be that the old size was once byte, not word, not sure. |
|
@Thaddy. From TP help: system constants: InOutRes: Integer = 0; |
|
Yes, but even in TP writeable! (Has always been so) That is by necessity of course, otherwise it can not be set to an error condition. ;) .... We used it in the famous - in the Netherlands - PerfectView (written in TP) to set our own error types. But the 16 bit integer type makes sense given the current word type if that is what you mean. |
|
Example regarding PerfectView (1.000.000+ licensed software): Database errors were classified as any of the above qualifications and categories except the compiler errors. I am not sure we used ranges or simply design restriction for that. Long time ago. |
|
Added some clarifying notes. Outside of routines that implement file I/O, it is not meant to be written to. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-09-30 21:53 | Thaddy de Koning | New Issue | |
2019-09-30 21:53 | Thaddy de Koning | Status | new => assigned |
2019-09-30 21:53 | Thaddy de Koning | Assigned To | => Michael Van Canneyt |
2019-09-30 21:55 | Thaddy de Koning | Note Added: 0118222 | |
2019-09-30 22:12 | Bart Broersma | Note Added: 0118223 | |
2019-10-01 08:25 | Thaddy de Koning | Note Added: 0118225 | |
2019-10-01 08:27 | Thaddy de Koning | Note Edited: 0118225 | View Revisions |
2019-10-01 08:32 | Thaddy de Koning | Note Edited: 0118225 | View Revisions |
2019-10-01 08:38 | Thaddy de Koning | Note Edited: 0118225 | View Revisions |
2019-10-01 08:38 | Thaddy de Koning | Note Edited: 0118225 | View Revisions |
2019-10-01 08:44 | Thaddy de Koning | Note Added: 0118226 | |
2019-10-01 08:45 | Thaddy de Koning | Note Edited: 0118226 | View Revisions |
2019-10-01 08:47 | Thaddy de Koning | Note Edited: 0118226 | View Revisions |
2019-10-01 20:19 | Michael Van Canneyt | Status | assigned => resolved |
2019-10-01 20:19 | Michael Van Canneyt | Resolution | open => fixed |
2019-10-01 20:19 | Michael Van Canneyt | Fixed in Version | => 3.3.1 |
2019-10-01 20:19 | Michael Van Canneyt | Fixed in Revision | => 1662 |
2019-10-01 20:19 | Michael Van Canneyt | FPCTarget | => 3.2.0 |
2019-10-01 20:19 | Michael Van Canneyt | Note Added: 0118238 |