(j3.2006) (SC22WG5.4906) [ukfortran] Comment on a comment on the WG5 letterballot on N1947
Van Snyder
Van.Snyder
Thu Jan 17 14:27:49 EST 2013
On Thu, 2013-01-17 at 07:52 -0600, Bill Long wrote:
>
> I assume this is a sample program from your "don't do this" bag for
> first-time programmers.
>
> > program ch0504
> > implicit none
> > real :: Light_Minute, Distance, Elapse
> > integer :: Minute, Second
> > real , parameter :: Light_Year=9.46*10**12
>
> This is a problem on a system with 32-bit integers as default. A
> "teaching opportunity" example. Though there is obviously a problem
> from looking at the output, it would be less obvious to the beginner
> what went wrong.
>
> On the other hand, the example is also in conflict with another
> recommendation against mixed-type expressions.
Programmers, even experienced ones, will continue to make these kinds of
mistakes. It's better (i.e., more reliable, and therefore less costly
in the long run) if the language and its processor help you out by
detecting potential or actual mistakes.
More information about the J3
mailing list