Modifying variables

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

An atom is anything an integer is and more.

    A sequence contains atoms.  A sequence can contain
other sequences but at some point must be either empty
or contain atoms.

    An object is either an atom or a sequence.  It is
free to be either.

    Sequences can not be atoms and atoms can not be
sequences.

    Integer are only whole numbers.
Example integers:  1, 2, 3, 4, 5, -15, 145, 90734.
Integers are limited to 31-bits.

atom a
integer i
sequence s
object x

a = 0.333333333333
a = 3216542154
a = #FFFF
a = 32452340987.234545
a = -345345.3423

i = 5+6
i = 'A'
i = '$'
i = '1' + '2'
i = 134345
i = -134134

s = {1, 2, 3, 4}
s = s + 1-- same as
s = {1, 2, 3, 4} + 1 --also same as
s = {2, 3, 4, 5}
s = -s -- same as: s = {-2, -3, -4, -5}
s = "ABCD" -- same as: s = {'A', 'B', 'C', 'D'}
s = "ABCD" -- same as: s = {65, 66, 67, 68}
s = {"AB", "CD", ""} --same as: s = {{65,66}, {67,68}, {}}
s = {1, 2, 3, 4}
s[1] = 5-- now s = {5, 2, 3, 4}
s[1..3] = 7 -- now s = {7, 7, 7, 4}
s = {"This", "and", "That"}
s[1][1..3] = "Kis" -- s[1] = "Kiss"


x = s
x = a
x = i

I hope this abundance of examples helps clear things up.
IF not.  Please post a little more specific question.

        Lucius L. Hilley III
        lhilley at cdc.net

> ---------------------- Information from the mail
header -----------------------
> Sender:       Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
> Poster:       Marshall Owen <hackman_17 at HOTMAIL.COM>
> Subject:      Euphoria
> --------------------------------------------------------------------------
-----
>
> Hi!
>
> I'm a PC programmer. I am fluent in BASIC, and have experimented with many
> other languages but BASIC has been usually best suited to my needs.  I
found
> Euphoria and tried it out, and it is <EM>really</EM> cool!  (Pardon my
> HTML.)  I need some help, though, using Euphoria.  The syntax of modifying
> variables, being somewhat different from BASIC, kindof confused me at
first.
>   If anyone can help me (i.e. send some demoish stuff) please do.
>
> PLEASE email me (hackman_17 at hotmail.com) because Euphoria is really cool,
> but I need some help.
>
> TNX*1.0E!
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu