user wrote:[color=blue]
> What's the meaning of these two lines?
> extern const double __infinity;
> #define INFINITY __infinity
>[/color]
AFAICT, the first one declares a const object of type 'double',
defined somewhere else in the program, and the second one kind of
give that object an additional name, "INFINITY". Actually, it
creates a macro named "INFINITY" that will if used in the code be
replaced with "__infinity ".
The two lines are actually sort of unrelated. The first one is
used by the compiler, the second one by the preprocessor.
user wrote:[color=blue]
>
> What's the meaning of these two lines?
> extern const double __infinity;
> #define INFINITY __infinity[/color]
It is connecting the identifier INFINITY (which is in your address
space) to the identifier __infinity (which is in the implementors
address space). What it actually does is going to be described in
your systems documentation. It is making it possible to revise
your program to fit some other system with relatively small
changes, whose purpose etc. should have been thoroughly documented
near those actual lines.
--
Chuck F (cbfalconer@yah oo.com) (cbfalconer@wor ldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net> USE worldnet address!
Comment