Print

Print


On Mar 14, 2017, at 4:10 AM, Anton Shterenlikht <[log in to unmask]> wrote:

> This arose in comp.lang.fortran
> regarding the meaning of 'should' in
> 5.3.19p3: "All members of an EQUIVALENCE group should
> have the VOLATILE attribute if any member has the
> VOLATILE attribute."
> The question was whether this is an advice to the programmer,
> or a requirement.
> 
> In 10-007r1 "should" is mostly reserved for notes.
> There are only 3 uses of "should" outside of notes,
> two in 5.3.19p3 and one in 13.7.49p5.
> 
> However, in 17-007r1 all "should" are in the normative text. 
> 
> I guess this is more than just a stylistic decision,
> but can somebody elaborate? Malcolm?
> 
> Also, there are many instances of "must" in 10-007r1
> but none in 17-007r1. Again, I imagine there is a good
> reason for this?


The use of words like should, shall, and must are specified in the ISO rules for formatting a standard. 

“should”  is used for a recommendation. 

“shall” us used for a requirement.

“must” is restricted to an external constraint, such a a legal requirement (imposed by some state authority) or a law of nature.  For example, oxygen must be present in an atmosphere to enable  long-term unprotected breathing by humans.   In general, there are no cases of normative text in the Fortran standard where “must” is appropriate.   It would be allowed to use MUST as the name of a variable in a code example that is part of a Note. Though I doubt we would do that. 

“may” grants permission. 

“can” indicates capability.  Officially “can” also indicates possibility, though we have used “might” in the past for this purpose.

Cheers,
Bill


> 
> Thanks
> 
> Anton

Bill Long                                                                       [log in to unmask]
Fortran Technical Support  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101