Myster Tour

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

------=_NextPart_000_0005_01C0037F.AE1ADD60
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I think I've found out why I find programming so confusing. I understand =
the commands, the concepts of sequence and atom etc. It's those little =
numbers that get to me. Little numbers that palgue nearly all of the =
commands! Here's what I'm ranting about:

THIS IS THE "SIMPLE.EX" FILE IN THE TUTORUAL

function simple_sort(sequence x)          -- how does one use function? =
and what does simple_sort(sequence x) mean?=20
object temp
    for i =3D 1 to length(x) + 1 do                -- is length(x) the =
legnth of simple_sort? if so, why not just for i=3D1 to =
length(simple_sort)
        for j =3D i + 1 to length(x) do
            if compare(x[j],x[i]) < 0 then     --    \
                -- swap x[j], x[i]                    --     \
                temp =3D x[j]                --                   ----   =
I need these ones explained, I've got no idea what they mean
                x[j] =3D x[i]                    --                /
                x[i] =3D temp                --                /
            end if
        end for
    end for
    return x                        -- whats return do?
end function

Well, there's another batch of problems.........get it? Batch? =
heheheh..............erm...
Thanks

-Thomas   (Yes, it is right to those who asked!)

------=_NextPart_000_0005_01C0037F.AE1ADD60
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I think I've found out why I find =
programming so=20
confusing. I understand the commands, the concepts of sequence and atom =
etc.=20
It's those little numbers that get to me. Little numbers that palgue =
nearly all=20
of the commands! Here's what I'm ranting about:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>THIS IS THE "SIMPLE.EX" FILE IN THE=20
TUTORUAL</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>function simple_sort(sequence=20
x)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- how =
does&nbsp;one=20
use function? and what does simple_sort(sequence x)&nbsp;mean? =
<BR>object=20
temp<BR>&nbsp;&nbsp;&nbsp; for i =3D 1 to length(x) + 1 =
do&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -- is length(x) =
the=20
legnth of simple_sort? if so, why not just for i=3D1 to=20
length(simple_sort)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for j =
=3D i + 1=20
to length(x)=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
if=20
compare(x[j],x[i]) &lt; 0 then&nbsp;&nbsp;&nbsp;&nbsp;=20
-- swap x[j], x[i]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
temp =3D x[j]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;=20
I&nbsp;need these ones explained, I've got no idea what they=20
;&nbsp;&nbsp;&nbsp;&nbsp;=20
x[j] =3D x[i]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
bsp;&nbsp;&nbsp;&nbsp;=20
x[i] =3D temp&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;=20
/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
end=20
if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end =
for<BR>&nbsp;&nbsp;&nbsp;=20
end for<BR>&nbsp;&nbsp;&nbsp; return x&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; --=20
whats return do?<BR>end function</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Well, there's another batch of =
problems.........get=20
it? Batch? heheheh..............erm...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-Thomas&nbsp;&nbsp; (Yes, it is right =
to those who=20

------=_NextPart_000_0005_01C0037F.AE1ADD60--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu