rename,erase does not recognize un-assigned
Original Reporter info from Mantis: hapr35
-
Reporter name: hapr35
Original Reporter info from Mantis: hapr35
- Reporter name: hapr35
Description:
applies to product version 2.6.4 too.
the users guide says in section 'run-time errors':
102
File not assigned
This is reported by Reset, Rewrite, Append, Rename, Erase,
if you call them with an unassigned file as parameter.
reset, rewrite, append behave like the docu says,
but not rename, erase.
in this case these two generate no error at all.
i think, they should generate.
Steps to reproduce:
{$mode fpc}
{$i+}
var a: file of byte;
begin
fillbyte( a, sizeof(a), 0 ); {to make behavior predictable}
{ _NO_ assign( a, 'oldname' ); }
rename( a, 'newname' )
end .
similar for erase.
Mantis conversion info:
- Mantis ID: 25932
- OS: suse linux
- OS Build: 11 sp3 32bit
- Build: ?
- Platform: i386
- Version: 2.6.2
- Fixed in version: 3.0.0
- Fixed in revision: 27694 (#8ac4a770)