1. Explane please....
Hy,
Can someone explane (in a normal way, so everybody can understand it)
what are these things :
object-orienting things
and
atom (I don't see the difference between an atom and an integer)
(And why did they call it an ATOM ? Is it so small ?
or is it equal to the size of an ATOM-BOM ?)
Bye,
PQ
QC
Get Your Private, Free Email at http://www.hotmail.com
2. Re: Explane please....
At 03:19 PM 3/10/99 PST, you wrote:
>Hy,
>
>Can someone explane (in a normal way, so everybody can understand it)
>what are these things :
>
>object-orienting things
Object-orientation is a way of modelling data and programs after objects in
the real world, as opposed to modular or structured programming. Objects
are pretty much everywhere. Dogs, cats, people, trees, etc. These objects
have certain properties (such as hair color, height, width), as well as
actions. Dogs run, people talk, trees drop their leaves, and so on.
In addition, certain objects can be grouped. For instance, you've always
seen ads that say "A Saturn is like no other car you've driven before".
That's a lie. Saturns, Fords, Chevys, etc, can all be grouped under an
_abstract_ class called car. Because of this, we don't have to relearn
driving when we change from a Chevrolet to a Ford.
The advantage of this in programming is that objects used in one program
can be used, modified, even derived from other classes. An object that is
thoroughly tested does not have to be modified that much, if at all, when
working in the next program. Structured programming, on the other hand, is
interrelated because it's not so much concerned with the data objects as it
is with the flow. The flow has to be modified with each program. Think of
it as having a general purpose microwave as opposed to having a microwave
that can only cook one batch of nachos.
3. Re: Explane please....
Patrick Quist <quistnet at HOTMAIL.COM> wrote:
>Hy,
>
>Can someone explane (in a normal way, so everybody can understand it)
>what are these things :
[snip]
>atom (I don't see the difference between an atom and an integer)
> (And why did they call it an ATOM ? Is it so small ?
> or is it equal to the size of an ATOM-BOM ?)
A Euphoria "atom" is any numeric value, integer or floating-point. The
"integer" type is a subset of the atom, and does not include the
floating-point values. They're called atoms because they're "indivisible" in
Euphoria, and they are the building-blocks of the sequences. (You can think
of sequences as "molecules" in this way.)
This is more thoroughly explained (rather clearly, I thought) under section
2.1.1 in REFMAN.DOC (the "Why do we call them atoms?" paragraph).
Gabriel Boehme
4. Re: Explane please....
- Posted by Bernie Ryan <bwryan at PCOM.NET>
Mar 10, 1999
-
Last edited Mar 11, 1999
In simple words Object Orientated Programming ( sometimes called OOP )
An object is a magic box that contains all the data, procedures, and
functions used to perform a special task. This box can can be connected
to other boxes to form a program. These are magic boxes and we don't know
what is inside them. All we know is what messages to send them and what
messages we will receive from them. We can not change the data directly
inside of them. But they have special messages that we can use to exchange
data with them if the programmer allows us to.
These magic boxes and all there features are described by a blueprint called
a CLASS.
In this blueprint the programmer discribes:
All of the internal data that the box uses
All of the messages that you will accept
All of the messages that you will send
And any other internal processing
Remember the OBJECT is what does the work the CLASS is just the blueprint
A WINDOW is an OBJECT
We send it messages, it can send messages back, and we can send and get
data from it. But we CAN'T change how it responses because we don't have
the source code. And thats the idea of oop to be able to use some object
that someone else wrote without being able to know how it works inside or
care, All we have to know is what messages to use. Be careful that you
don't confuse the word "object" in Euphoria with the OBJECT in OOP.
I hope this helps
Bernie