Myster Tour
- Posted by Paul Kerslake <paulk at UNISERVE.COM> Aug 11, 2000
- 413 views
------=_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> </DIV> <DIV><FONT face=3DArial size=3D2>THIS IS THE "SIMPLE.EX" FILE IN THE=20 TUTORUAL</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>function simple_sort(sequence=20 x) -- how = does one=20 use function? and what does simple_sort(sequence x) mean? = <BR>object=20 temp<BR> for i =3D 1 to length(x) + 1 = do =20 -- is length(x) = the=20 legnth of simple_sort? if so, why not just for i=3D1 to=20 length(simple_sort)<BR> for j = =3D i + 1=20 to length(x)=20 do<BR> = if=20 compare(x[j],x[i]) < 0 then =20 -- swap x[j], x[i] = =20 =20 temp =3D x[j] =20 =20 I need these ones explained, I've got no idea what they=20 ; =20 x[j] =3D x[i] =20 -- = =20 =20 bsp; =20 x[i] =3D temp =20 -- = =20 =20 /<BR> = end=20 if<BR> end = for<BR> =20 end for<BR> return x = =20 = --=20 whats return do?<BR>end function</FONT></DIV> <DIV> </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> </DIV> <DIV><FONT face=3DArial size=3D2>-Thomas (Yes, it is right = to those who=20 ------=_NextPart_000_0005_01C0037F.AE1ADD60--