1 little sequence problem

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

------=_NextPart_000_005C_01BF9057.280A9580
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Can you help me out here, I just can't get over this.

when i use this code:

sequence s1
for i=3D1 to 10 do
 s1[i]=3Di
end for

i get error message: variable s1 has not been assigned a value=20

And when i add this:
s1=3D{}
i get this error message:=20
subscript value 1 is out of bounds, assigning to a sequence of length 0=20


Are sequences in general so compilcated and error making? I have stuck =
several times now with sequence problem (when using integer, object,... =
types with them ...), and i have used euphoria for programming little =
time.
Though I think sequences are the best thing in Euphoria, specially when =
compared with C.(!!awful!!) I wont be using C anymore (not so often) =
because i cant get anywhere wit it.

------=_NextPart_000_005C_01BF9057.280A9580
        charset="iso-8859-2"
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-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Can you help me out here, I just can't =
get over=20
this.<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>when i use this code:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#808000 face=3DArial size=3D2><EM>sequence s1<BR>for =
i=3D1 to 10=20
do<BR>&nbsp;s1[i]=3Di<BR>end for</EM></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>i get error message: <FONT =
color=3D#ff0000>variable=20
s1 has not been assigned a value </FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And when i&nbsp;add this:</FONT></DIV>
<DIV><FONT color=3D#808000 face=3DArial size=3D2>s1=3D{}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i get this error message: </FONT></DIV>
<DIV><FONT color=3D#ff0000 face=3DArial size=3D2>subscript value 1 is =
out of bounds,=20
assigning to a sequence of length 0 </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2>Are sequences in =
general so=20
compilcated and error making? I have stuck several times now with =
sequence=20
problem (when using integer, object,... types with them ...), and i have =
used=20
euphoria for programming little time.</FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2>Though I think =
sequences are the best=20
thing in Euphoria, specially when compared with C.(!!awful!!) I wont be =
using C=20
anymore (not so often) because i cant get anywhere wit=20

------=_NextPart_000_005C_01BF9057.280A9580--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu