1 <!DOCTYPE HTML PUBLIC
"-//W3O//DTD W3 HTML 2.0//EN">
2 <!-- This collection of hypertext pages is Copyright 1995, 1996 by Steve Summit. -->
3 <!-- This material may be freely redistributed and used -->
4 <!-- but may not be republished or sold without permission. -->
7 <link rev=
"owner" href=
"mailto:scs@eskimo.com">
8 <link rev=
"made" href=
"mailto:scs@eskimo.com">
9 <title>section
4.7: Register Variables
</title>
10 <link href=
"sx7f.html" rev=precedes
>
11 <link href=
"sx7h.html" rel=precedes
>
12 <link href=
"sx7.html" rev=subdocument
>
15 <H2>section
4.7: Register Variables
</H2>
18 <p>The
<TT>register
</TT> keyword is only a hint.
19 The compiler might not put something in a register even though you ask it to,
22 might put something in a register even though you don't ask it to.
23 Most modern compilers do a good job of deciding when to put
26 you don't need to worry about it,
27 and you don't have to use the
<TT>register
</TT> keyword at all.
28 </p><p>(A note to assembly language programmers:
29 there's no way to specify which register
30 a
<TT>register
</TT> variable gets assigned to.
32 when you specify a function parameter as
<TT>register
</TT>,
33 it just means that the local copy of the parameter
34 should be copied to a register if possible;
35 it does
<em>not
</em> necessarily indicate
36 that the parameter is going to be passed in a register.)
40 <a href=
"sx7f.html" rev=precedes
>prev
</a>
41 <a href=
"sx7h.html" rel=precedes
>next
</a>
42 <a href=
"sx7.html" rev=subdocument
>up
</a>
43 <a href=
"top.html">top
</a>
46 This page by
<a href=
"http://www.eskimo.com/~scs/">Steve Summit
</a>
47 //
<a href=
"copyright.html">Copyright
</a> 1995,
1996
48 //
<a href=
"mailto:scs@eskimo.com">mail feedback
</a>