This file is indexed.

/usr/share/doc/libcnf-dev/html/node15.html is in libcnf-dev 4.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Arguments</TITLE>
<META NAME="description" CONTENT="Arguments">
<META NAME="keywords" CONTENT="sun209">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="sun209.css">
<LINK REL="next" HREF="node16.html">
<LINK REL="previous" HREF="node14.html">
<LINK REL="up" HREF="node14.html">
<LINK REL="next" HREF="node16.html">
</HEAD>
<BODY >
<BR> <HR>
<A NAME="tex2html358"
 HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
<A NAME="tex2html356"
 HREF="node14.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
<A NAME="tex2html350"
 HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>   <A HREF="sun209.html#stardoccontents"><IMG
 ALIGN="BOTTOM" BORDER="0" SRC="contents_motif.gif"
 ALT="252"></A>
<BR>
<B> Next:</B> <A NAME="tex2html359"
 HREF="node16.html">Function Values</A>
<BR>
<B>Up:</B> <A NAME="tex2html357"
 HREF="node14.html">Communication Between Routines</A>
<BR>
<B> Previous:</B> <A NAME="tex2html351"
 HREF="node14.html">Communication Between Routines</A>
<BR> <HR> <P>

<!--End of Navigation Panel-->

<H2><A NAME="SECTION00051000000000000000"></A><A NAME="xref_arguments"></A><A NAME="args"></A>
<BR>
Arguments
</H2>

<P>
This is the main method for passing data between a calling program and the
called subprogram. The calling program takes the actual arguments of the call
to the  subprogram, constructs an argument list and then passes execution to
that routine. The subprogram then uses the values in the argument list to
access the actual arguments. It may pass data back to the calling program by
modifying the data in some or all of the arguments. As far as passing arguments
between a program and a subprogram is concerned, the principal difference
between FORTRAN and C is the method used for passing the arguments.

<P>
Note that the above paragraph refers to modifying arguments. 
On all the machines we support, the actual contents of the argument list is 
never modified.
What may be modified is the contents of the location pointed to by an element
of the argument list. This is not to say that other computers would not modify
the argument list itself.

<P>
There are three commonly used methods for passing subprogram arguments: call by
value, call by reference and call by descriptor. Call by value passes the
actual value of the argument to the called routine, call by reference passes a
pointer to the value of the argument (<I>i.e.</I> the address of the 
argument) and call by descriptor passes a pointer to a structure describing 
the argument.

<P>
Although these are the basic methods of passing arguments, a particular type of
argument may be passed by a combination of these. For example, some compilers
use a combination of call by reference and call by value to pass character 
arguments.
What is common is that all arguments are passed by exchanging data values. 
It is how those values are to be interpreted that gives rise to the different
mechanisms.

<P>
The FORTRAN standard does not specify how arguments should be passed to
subprograms and indeed different compilers for different machines do use
different methods. It is most usual for numeric data types to be passed by
reference since the subprogram may modify the value of the argument. This is
most easily achieved by passing a pointer to the storage location containing
the data value, rather than a copy of the value itself. On the other hand, the
C standard explicitly states that values cannot be returned to the calling
routine directly through arguments and so call by value is most commonly used.
It is worth recalling that the argument list of a routine is simply a sequence
of computer words. If these are a list of addresses of data values then
everything is simple. However, suppose that an array was passed by value. This
would mean that the compiler would have to arrange for a copy of the entire
array to be placed in the argument list that was passed to the called
subprogram. Consequently, arrays are invariably passed by reference or by
descriptor, never by value.

<P>
It may seem tedious to have to think about the actual mechanisms that a
compiler uses to pass data between routines when all you want to do is to get
on with your programming. However, understanding this is the key to mixed
language programming. Fortunately the facilities described in
<A HREF="node18.html#f77_cfromf">More on Calling C from FORTRAN</A>
 and
<A HREF="node36.html#f77_ffromc">More on Calling FORTRAN from C</A>
 hide much of this from the programmer. 

<P>
<BR> <HR>
<A NAME="tex2html358"
 HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
<A NAME="tex2html356"
 HREF="node14.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
<A NAME="tex2html350"
 HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>   <A HREF="sun209.html#stardoccontents"><IMG
 ALIGN="BOTTOM" BORDER="0" SRC="contents_motif.gif"
 ALT="252"></A>
<BR>
<B> Next:</B> <A NAME="tex2html359"
 HREF="node16.html">Function Values</A>
<BR>
<B>Up:</B> <A NAME="tex2html357"
 HREF="node14.html">Communication Between Routines</A>
<BR>
<B> Previous:</B> <A NAME="tex2html351"
 HREF="node14.html">Communication Between Routines</A>
<BR> <HR> <P>

<!--End of Navigation Panel-->
<ADDRESS>
<I>CNF and F77 Mixed Language Programming -- FORTRAN and C<BR>Starlink User Note 209<BR>P.M. Allan<BR>A.J. Chipperfield<BR>R.F. Warren-Smith<BR>19 January 2000<BR>E-mail:<A HREF="mailto:ussc@star.rl.ac.uk">ussc@star.rl.ac.uk</A></I>
</ADDRESS>
</BODY>
</HTML>