|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
KL Guest
|
Posted: Mon Dec 18, 2006 10:11 am Post subject: Problem �Delete_obj_on_error�: |
|
|
One would expect that by using the compiler option /DELETE_OBJ_ON_ERROR the object file of a program would be deleted in case of a compiler error. However, although the compiler reports 3 errors for the attached program(3 ERRORS [<DELETE_OBJ_ON_ERRORS> FTN95/Win32 v5.0.0]), the object file is created and the program is run.
I have run the program with FTN95 Version 5.0 and a bat file:
del comp.lis
del *.obj
del *.exe
ftn95 Delete_obj_on_errors.f95 /checkmate /underflow /DELETE_OBJ_ON_ERROR >> comp.lis
slink Delete_obj_on_errors.obj
sdbg Delete_obj_on_errors.exe
The program is:
WinApp
Program Delete_obj_on_errors
Implicit None
Real :: a
! Error: Time1, Time2 and i are not declared
! Although the program was compiled with
! /DELETE_OBJ_ON_ERROR the obj file is
! created and the program is run.
Call Cpu_Time ( Time1 )
a = 1.
Do i = 1, 2
a = a + 1.
End Do
Write (*,*) 'a = ', a
Call Cpu_Time ( Time2 )
write (*,*)'Processing time was',TIME2-TIME1, ' seconds'
End Program Delete_obj_on_errors
Best regards
Klausd Lassmann |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Thu Dec 21, 2006 4:55 pm Post subject: |
|
|
Klaus
I suspect that the problem here is inadequate documentation.
/DELETE_OBJ_ON_ERROR is designed to delete object files of zero size.
This occurs when there are fatal compilation errors.
To make it work in other cases you must add /ERRFAIL. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|