File: portability.html

package info (click to toggle)
ftnchek 2.11.2-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,392 kB
  • ctags: 2,790
  • sloc: ansic: 21,570; fortran: 2,921; yacc: 2,794; sh: 1,623; makefile: 693; lisp: 264; awk: 163
file content (92 lines) | stat: -rw-r--r-- 4,269 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<HTML>
<HEAD>
<TITLE>Option: portability</TITLE>
</HEAD>
<BODY>
<A HREF="toc.html">Table of Contents</A><P>
<P>Previous: <A HREF="pointersize.html">-pointersize</A><HR><P>
<H2>Option: <font color=#FF0080>portability</font></H2><P>
<A NAME="portability"></A><DT><B><A HREF="portability.html">-portability</A>=</B><I>list</I> 
 </DT>
<DD><B>ftnchek </B> will give warnings for a variety of non-portable usages.  Examples 
include the use of tabs except in comments or inside strings, the use 
of Hollerith constants, and the equivalencing of variables of different 
data types.  This option does not produce warnings for supported extensions 
to the Fortran 77 Standard, which may also cause portability problems. 
 To catch those, use the <B><A HREF="f77.html">-f77</A> </B> setting. By default, all warnings are turned 
off.  <blockquote></DD>
</DL>
<P>
This setting provides detailed control over the warnings about possible 
portability problems.  The <I>list </I> consists of keywords separated by commas 
or colons. There are three special keywords: <B>all </B> to turn on all the warnings 
about nonportable usages, <B>none </B> to turn them all off, and <B>help </B> to print 
the list of all the keywords with a brief explanation of each. If <I>list 
</I> is omitted, <B><A HREF="portability.html">-portability</A> </B> is equivalent to <B><A HREF="portability.html">-portability</A>=all </B>, and <B>-noportability 
</B> is equivalent to <B><A HREF="portability.html">-portability</A>=none </B>. The warning keywords with their meanings 
are as follows: 
<DL>

<DT><B>backslash</B>:  </DT>
<DD>Backslash character in strings.  Since some 
compilers treat the backslash as an escape character, its presence can 
cause problems even though it is used in a standard-conforming way. </DD>

<DT><B>common-alignment</B>: 
 </DT>
<DD>COMMON block variables not in descending order of storage size.  Some 
compilers require this ordering because of storage alignment requirements. 
</DD>

<DT><B>hollerith</B>:  </DT>
<DD>Hollerith constants (other than within FORMAT specifications). 
 The Hollerith data type is a feature of Fortran IV that has been deleted 
in the Fortran 77 standard.  It is superseded by the character data type. 
 Storing Hollerith data in variables of a numeric or logical data type 
is nonportable due to differing word sizes. </DD>

<DT><B>long-string</B>:  </DT>
<DD>String constants, 
variables, or expressions over 255 chars long. </DD>

<DT><B>mixed-equivalence</B>:  </DT>
<DD>Variables 
of different data types equivalenced. </DD>

<DT><B>mixed-size</B>:  </DT>
<DD>Variables declared with 
default precision used with variables given explicit precision, in expressions, 
assignments, or as arguments.  For example, if a variable declared as REAL*8 
 is treated as equivalent to DOUBLE PRECISION . </DD>

<DT><B>real-do</B>:  </DT>
<DD>Non-integer DO 
loop index and bounds.  These can cause a program's results to depend on 
the hardware characteristics of the particular computer used. </DD>

<DT><B>param-implicit-type</B>: 
 </DT>
<DD>Implicit typing of a parameter by the data type of the value assigned, 
if it differs from the default type.  This warning can only occur if implicit 
parameter typing has been turned on by the <B><A HREF="source.html">-source</A>=parameter-implicit-type 
</B> option, or if the PARAMETER  statement is of the nonstandard form without 
parentheses.  If this option is turned on, then any instances where implicit 
parameter typing occurs and where the implicit type is different from 
the default type based on the first letter of the parameter name, will 
be warned about.  Implicit parameter typing can change the semantics of 
statements where the parameter is used, causing portability problems. </DD>

<DT><B>tab</B>: 
 </DT>
<DD>Tabs in source code.  Tabs are interpreted differently by different compilers. 
 This warning will be given only once, at the end of the file. </DD>
</DL>
<P>
See also: 
<B><A HREF="f77.html">-f77</A> </B>, <B><A HREF="f90.html">-f90</A> </B>, <B><A HREF="f95.html">-f95</A> </B>, <B><A HREF="pretty.html">-pretty</A> </B>, <B><A HREF="wordsize.html">-wordsize</A> </B>.  </blockquote>
<P>
 
<DL>

<P><HR><P>Next: <A HREF="pretty.html">-pretty</A>
</BODY></HTML>