sorry about this but could anyone give me a simple explanation of what
is a "literal" and what is a "symbolic constant" and what is a
"manifest constant"?
Is a literal practically any number or string that you store in a
variable?
And what is the difference between a "symbolic constant" and a
"manifest constant"? Is there any difference?
Thanks in advance
First, since this is crossposted to 5 groups involving different programming
languages, be very happy that be sheer coincidence you've asked about the
definitions of terms that are used about the same way in all of programming.
Otherwise we'd have had to employ some unsavory characters with ice picks, chain
saws and other equipment, and have them call on you.
Don't cross-post that massively, and ideally: post to one group only.
Now, "literal": that's a value specified directly in the source code.
"symbolic constant": that's a name that denotes a value.
"manifest constant": who knows, google it, check the author's definition. It's
evidently a constant. And evidently it's manifest in some way. :-)
Cheers, hth., and please stop that trollish cross-posting,
- Alf
--
Due to hosting requirements I need visits to <url: http://alfps.izfree.com/>.
No ads, and there is some C++ stuff! :-) Just going there is good. Linking
to it is even better! Thanks in advance!
> Hi all
>
> sorry about this but could anyone give me a simple explanation of
> what is a "literal"
6, 'x', 42.0, "Hello world"
In C99, (int[]){2, 4} is also a literal.
> and what is a "symbolic constant"
EXIT_SUCCESS, EXIT_FAILURE, EOF, BUFSIZ, to name but a few. Here's
how to create them:
#define CM_PER_INCH 2.54
#define PI 4
> and what is a "manifest constant"?
6, 'x', 42.0, "Hello world"
> Is a literal practically any number or string that you store in a
> variable?
No, it's practically any number or string that you see /outside/
variables.
> And what is the difference between a "symbolic constant" and a
> "manifest constant"?
A symbolic constant is a constant that is represented in the code by
a symbol.
A manifest constant is a constant that is made manifest in the code
itself (as opposed to being represented by a symbol).
> Is there any difference?
180 degrees.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
>sorry about this but could anyone give me a simple explanation of what
>is a "literal" and what is a "symbolic constant" and what is a
>"manifest constant"?
See http://mindprod.com/jgloss/literal.html for literal
http://mindprod.com/jgloss/constant.html for symbolic constant.
I have never heard of a manifest constant.
There are expressions that can be evaluated at compile time. I have
not heard a short name for them. Perhaps we could call them "manifest
constants" since their value is more obvious than other constants.
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Danish studies of 10,000 birds killed revealed that almost all died in
collisions with buildings, cars and wires; only 10 were killed by windmills.
Alternative energy sources are absolutely necessary.
Global warming will kill birds and bats, as well as other species,
in much greater numbers than wind power."
~ Dr. David Suzuki
I believe manifest constants are symbolic constants that are defined by
the implementation.
e.g.:
__unix__, etc...
One minute of googling brought me to
<http://en.wikipedia.org/wiki/Variable#Constants>
Punching "literal" into Wikipedia's own search took another two
minutes to get me to
<http://en.wikipedia.org/wiki/Object_literal>
Practice your google-fu, Grasshopper.
--
Lew
In C/C++.
Roedy is most likely reading this in the Java group.
Arne
Or by the program.
Arne Vajhøj wrote:
> In C/C++.
--
Lew