Re: little question once again

new topic     » goto parent     » topic index » view thread      » older message » newer message

>Subject: Re: little question once again
> Date: Sat, 25 Sep 1999 23:24:09 -0400
> From: Bernie Ryan <bwryan at PCOM.NET>
>
> On Sun, 26 Sep 1999 02:18:04 GMT, Lionel Wong <eljay98 at HOTMAIL.COM> wrote:
>
>>>   constants and variables are called VARIABLES
>>
>>Unfortunately, Bernie, if a constant is a variable then it's not constant
>>anymore. And if a variable is a constant then it's not variable anymore.
>>
>>I tried to think so before, but it's a paradox, cancelling itself in
truth.
>>Computer terms are paradoxical puns. =)
>>
>>Thx anyway,
>>Lionel.
>>
>>______________________________________________________
>>Get Your Private, Free Email at http://www.hotmail.com
>
>  Linonel
>      You still do not understand what I mean.
>      A variable is the name of the location for storing data in memory.
>      You can define a variable to contain a constant value.
>      You can define a variable to contain a changing value.
>      Both are called variables.
>  Bernie

I am a new person on this mail list(as will seem obvious by the fact that I
posted this message originally in the wrong place, because I have been a
digest only person up to now), but have written to Robert in the past on
this very subject. The important point about"variable" and "constant" is
that in Euphoria, a constant is a very special animal. It is forced to
global scope by definition, and by the requirement that it be found in the
main line of the program. I can only assume, that constants are only handled
once by the interpreter, put into a special non-dynamic area at the
beginning of the name table and never revisited except for reference. I
also, suspect that in the interpretation process, they are substituted
either on a parse pass or with the "literals" in a statement. Speaking of
that, I believe that "literal" may be a term that all of you have been
searching for. All atoms that are not written as variables are literals by
usage in many other languages. The logical treatment of all atoms as numbers
in Euphoria gets rid of a confusion found in most languages at the expense
of introducing a confusion in the minds of most people not working as
programmers. The treatment of constants is exactly like that of literals
within the language. It is merely a bow to the symbolic way in which humans
process information. That is why it "logically" belongs in a parsing pass of
a statement rather than in dynamic variable resolution.
On Sat, 25 Sep 1999 22:37:06 -0400, Irv Mullins <irv at ELLIJAY.COM> wrote:

>On Sat, 25 Sep 1999, you wrote:
>> >   constants and variables are called VARIABLES
>>
>> Unfortunately, Bernie, if a constant is a variable then it's not constant
>> anymore. And if a variable is a constant then it's not variable anymore.
>
>But, a constant IS variable. It can only be varied by the programmer prior
to
>the run (or the compile)
>example:
>constant pi = 3.0      -- that's wrong, but I can change it!
>
>Irv

And the idea that a constant is a variable because it can be changed by the
programmer should be an obvious logical dead-end...anything can be changed
by the programmer...then the whole program is a variable by that thinking.
Logically, that is so, but a real stretch for this discussion.

Everett L.(Rett) Williams
rett at gvtc.com

Everett L.(Rett) Williams
rett at gvtc.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu