1. structure member names problem
- Posted by =?iso-8859-2?B?qWtvZGE=?= <tone.skoda at SIOL.NET> Apr 24, 2000
- 380 views
------=_NextPart_000_000E_01BFADFD.3E2C8760 charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable another big weakness of Euphoria: =20 in file.ew i have global sequence gs this gs has members (gs[1]=3Dtext, gs[2]=3Dcurline,...) =20 problem: if i want to access one member of this structure i must = remember under which number it is. i can avoid this by decalaring global constants = gs_text=3D1,gs_curline=3D2,... , but this really sux. You have to write = this constants each time and they have long names, so instead of using = this, like in C: gs[text] --THIS WAY IT SHOULD BE!!! you must use =20 gs[gs_text] --THIS WAY YOU MUST DO IT NOW anybody knows how to access members of structure(sequence) like in C, or = how to even make a structure? ------=_NextPart_000_000E_01BFADFD.3E2C8760 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>another big weakness of = Euphoria:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>in file.ew i have global sequence = gs</FONT></DIV> <DIV><FONT face=3DArial size=3D2>this gs has members (gs[1]=3Dtext,=20 gs[2]=3Dcurline,...)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>problem: if i want to access one member = of this=20 structure i must remember under which number it is.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>i can avoid this by decalaring global = constants=20 gs_text=3D1,gs_curline=3D2,... , but this really sux. You have to write = this=20 constants each time and they have long names, so instead of using this, = like in=20 C:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>gs[text] --THIS WAY IT SHOULD = BE!!!</FONT></DIV> <DIV><FONT face=3DArial size=3D2>you must use </FONT></DIV> <DIV><FONT face=3DArial size=3D2>gs[gs_text] --THIS WAY YOU MUST DO IT=20 NOW</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>anybody knows how to access members of=20 structure(sequence) like in C, or how to even make a=20 ------=_NextPart_000_000E_01BFADFD.3E2C8760--
2. Re: structure member names problem
- Posted by "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV> Apr 24, 2000
- 371 views
"=A9koda" wrote: > anybody knows how to access members of=20 > structure(sequence) like in C, or how=20 > to even make a structure? There are tools in Win32Lib that make it fairly painless. It's pretty = easy to translate stuctures to Euphoria. Look for 'fetch' and 'store'. -- David Cuny
3. Re: structure member names problem
- Posted by Agent Spectre <Email at SPECTRESOFTWARE.CO.UK> Apr 24, 2000
- 390 views
------=_NextPart_000_001F_01BFAE1D.D99D1BE0 charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Skoda Wrote: >>another big weakness of Euphoria: (snip) >>gs[text] --THIS WAY IT SHOULD BE!!! >>you must use =20 >>gs[gs_text] --THIS WAY YOU MUST DO IT NOW How is this a weakness? Any programming project I have started has had = to be planned first... and even If I was programming "on the fly" and = couldnt remember what was placed where in a sequence (and to be honest, = I cannot see a project of any size getting completed with this approach) = then I could use a for-loop to find a sequence within a sequence. But = thats beside my point, my point is a little planning goes a long way, = especially when the bugs crop up :) ------=_NextPart_000_001F_01BFAE1D.D99D1BE0 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=3Dwindows-1252" = http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 = Transitional//EN"> <META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>Skoda Wrote:</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> <DIV><FONT face=3DArial size=3D2>>>another big weakness of=20 Euphoria:</FONT></DIV> <DIV> (snip)</DIV></FONT></DIV> <DIV><FONT size=3D2> <DIV><FONT face=3DArial size=3D2>>>gs[text] --THIS WAY IT SHOULD=20 BE!!!</FONT></DIV> <DIV><FONT face=3DArial size=3D2>>>you must use = </FONT></DIV> <DIV><FONT face=3DArial size=3D2>>>gs[gs_text] --THIS WAY YOU MUST = DO IT=20 NOW</FONT></DIV> <DIV> </DIV> <DIV>How is this a weakness? Any programming project I have started has = had to=20 be planned first... and even If I was programming "on the fly" and = couldnt=20 remember what was placed where in a sequence (and to be honest, I cannot = see a=20 project of any size getting completed with this approach) then I could = use a=20 for-loop to find a sequence within a sequence. But thats beside my = point, my=20 point is a little planning goes a long way, especially when the bugs = crop up=20 ------=_NextPart_000_001F_01BFAE1D.D99D1BE0--