Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
For portability to machines where a pointer (such as to a label,
which is how
ASSIGN and its relatives,
GOTO and assigned-
is wider (bitwise) than an
uses a different memory location to hold the
ASSIGNed value of a variable
than it does the numerical value in that variable, unless the
variable is wide enough (can hold enough bits).
In particular, while
I = 10
as, in C notation, `i = 10;', it implements
ASSIGN 10 TO I
as, in GNU's extended C notation (for the label syntax),
`__g77_ASSIGN_I = &&L10;' (where `L10' is just a massaging
of the Fortran label `10' to make the syntax C-like;
actually generate the name `L10' or any other name like that,
since debuggers cannot access labels anyway).
While this currently means that an
ASSIGN statement does not
overwrite the numeric contents of its target variable, do not
write any code depending on this feature.
g77 has already changed this implementation across
versions and might do so in the future.
This information is provided only to make debugging Fortran programs
compiled with the current version of
g77 somewhat easier.
If there's no debugger-visible variable named `__g77_ASSIGN_I'
in a program unit that does `ASSIGN 10 TO I', that probably
g77 has decided it can store the pointer to the label directly
into `I' itself.
See section 9.9.7 Ugly Assigned Labels, for information on a command-line option
g77 to use the same storage for both normal and
assigned-label uses of a variable.
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|