1. Type help
------=_NextPart_000_000A_01BE8186.93631EA0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hey, I'm trying to make an RGB type and this is what I've come up with. =
Every time I try to implement it though it claims I am trying to =
redefine the variable i. I've tried changing the name of i. But I =
still get this error Can anybody help. What follows is the type I came =
up with.
type RGB_Trip(sequence redgreenblue)
integer l, i
l =3D length(redgreenblue)
if l > 3 then
return 0
end if
for i =3D 1 to 3 do
if sequence(redgreenblue[i]) then
return 0
elsif redgreenblue[i] > 0 then
return 0
elsif redgreenblue[i] > #FF then
return 0
end if
end for
end type
------=_NextPart_000_000A_01BE8186.93631EA0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hey, I'm trying to make an RGB type =
and this is=20
what I've come up with. Every time I try to implement it though it =
claims=20
I am trying to redefine the variable i. I've tried changing the =
name of=20
i. But I still get this error Can anybody help. What =
follows=20
is the type I came up with.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>type RGB_Trip(sequence=20
redgreenblue)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2> integer l, =
i</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2> l =3D=20
length(redgreenblue)<BR> if l > 3=20
then<BR> return 0<BR> end=20
if<BR> for i =3D 1 to 3 do<BR> =
if=20
sequence(redgreenblue[i])=20
then<BR> return=20
0<BR> elsif redgreenblue[i] > 0=20
then<BR> return=20
0<BR> elsif redgreenblue[i] > #FF=20
then<BR> return=20
0<BR> end if</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2> end for</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>end =
------=_NextPart_000_000A_01BE8186.93631EA0--