Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!brainerd From: brainerd@unmvax.unm.edu (Walt Brainerd) Newsgroups: comp.lang.fortran Subject: Re: How much illegal are these? Message-ID: <289@unmvax.unm.edu> Date: 19 Aug 89 15:33:29 GMT References: <116400001@uxa.cso.uiuc.edu> Organization: University of New Mexico at Albuquerque Lines: 26 In article <116400001@uxa.cso.uiuc.edu>, gsg0384@uxa.cso.uiuc.edu writes: > > > Hi, > How much illegal are the following two statements? > > program main > > real b, c, a(10,10) > data a/100*1./ ! or assign them by two do loops > > b = 0*a(0,2) > c = 0*a(1,0) > The standard says (p. 5-5, lines 9-14) that the values of the subscripts must be withing the declared bounds, so both are illegal. There has been much discussion about how much trouble you can get into using nonstandard extensions. This is not allowed because some vendors have an "explicit extension", but rather because nonstandard usage is not checked. It is hoped that in future you will at least have an option to turn on during development that will catch errors of this kind. -- Walt Brainerd Unicomp, Inc. brainerd@unmvax.cs.unm.edu 2002 Quail Run Dr. NE Albuquerque, NM 87122 505/275-0800