File: wordsize.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 (51 lines) | stat: -rw-r--r-- 2,920 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
<HTML>
<HEAD>
<TITLE>Option: wordsize</TITLE>
</HEAD>
<BODY>
<A HREF="toc.html">Table of Contents</A><P>
<P>Previous: <A HREF="volatile.html">-volatile</A><HR><P>
<H2>Option: <font color=#FF0080>wordsize</font></H2><P>
<A NAME="wordsize"></A><DT><B><A HREF="wordsize.html">-wordsize</A>=</B><I>num</I>  </DT>
<DD>Specifies the default 
word size to be <I>num </I> bytes.  This is the size of logical and single-precision 
numeric variables that are not given explicit precisions.  (Explicit precisions 
for non-character variables are an extension to the Fortran 77 Standard, 
and are given by type declarations such as REAL*8 X .) Double-precision 
and complex variables will be twice this value, and double complex variables 
four times. Quad-precision constants and intrinsic function results will 
be four times this value.  Note that variables declared as REAL*16  will 
be regarded as quad precision only if the word size is 4 bytes. Default 
= turn-on = 4 bytes.  <blockquote></DD>
</DL>
<P>
The word size value does not matter for checking standard-conforming 
programs that do not declare explicit precisions for non-character variables 
or store Hollerith data in variables.  This setting also does not affect 
the default size of character variables, which is always 1 byte.  Hollerith 
constants also are assumed to occupy 1 byte per character. <P>
The word size 
is used to determine whether truncation occurs in assignment statements, 
and to catch precision mismatches in subprogram argument lists and common 
block lists.  The exact warnings that are issued will depend on the status 
of other flags.  Under both the <B><A HREF="portability.html">-portability</A>=mixed-size </B> and the <B>-nowordsize 
</B> flag, any mixing of explicit with default precision objects (character 
expressions not included) is warned about.  This applies to arithmetic 
expressions containing both types of objects, and to subprogram arguments 
and COMMON variables. Under control of the <B><A HREF="truncation.html">-truncation</A>=demotion </B> and <B>promotion 
</B> options, a warning is given for assignment of an expression to a shorter 
variable of the same type, or for promotion of a lower precision value 
to higher precision in an arithmetic expression or an assignment statement. 
<P>
Giving a word size of 0, or equivalently, using <B>-nowordsize </B> means that 
no default value will be assumed. This is equivalent to specifying <B><A HREF="portability.html">-portability</A>=mixed-size 
</B>. Use it to find cases of mixing default and explicit precision, for example 
to flag places where REAL*8  is treated as equivalent to DOUBLE PRECISION 
. <P>
See also: <B><A HREF="pointersize.html">-pointersize</A> </B>, <B><A HREF="portability.html">-portability</A> </B>, <B><A HREF="truncation.html">-truncation</A> </B>.  </blockquote>
<P>
 
<DL>

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