1. structure
- Posted by gwalters at sc.rr.com Jul 26, 2001
- 369 views
This is a multi-part message in MIME format. ------=_NextPart_000_0027_01C115AA.D6FB46A0 charset="Windows-1252" Can someone explain the structure here. EU says screen has a length of = 3.. global sequence screen screen =3D {} screen =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10}) screen =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) screen =3D append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) screen =3D append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) screen =3D append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) screen =3D append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) EU says that: screen [1][1] is 1 screen [1][2] is 3 screen [1][3] is "Customer Number+" but EU says screen[1][8] is out of bounds and I would have thought it = would be 5!! thanks for any ensight... ..george ------=_NextPart_000_0027_01C115AA.D6FB46A0 Content-Type: text/html; charset="Windows-1252" 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> <META content=3D"MSHTML 5.00.3105.105" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>Can someone explain the structure here. EU = says screen=20 has a length of 3..</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>global sequence screen<BR> screen =3D = {}<BR> screen=20 =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10})<BR> screen=20 =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20})<BR> = screen =3D=20 append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30})<BR> = screen =3D=20 append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40})<BR> = screen =3D=20 append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50})<BR> = screen =3D=20 append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60})</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>EU says that:</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> screen [1][1] is 1</FONT></DIV> <DIV><FONT size=3D2> screen [1][2] is 3</FONT></DIV> <DIV><FONT size=3D2> screen [1][3] is "Customer=20 Number+"</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>but EU says screen[1][8] is out of bounds and I = would have=20 thought it would be 5!!</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>thanks for any ensight...</FONT></DIV> <DIV> </DIV> ------=_NextPart_000_0027_01C115AA.D6FB46A0--
2. structure
- Posted by gwalters at sc.rr.com Jul 26, 2001
- 378 views
This is a multi-part message in MIME format. ------=_NextPart_000_003D_01C115B2.5D538080 charset="Windows-1252" I have found the problem. There was a short item and EU thinks the = length of the sequence is the length of the shortest element... Can someone explain the structure here. EU says screen has a length of = 3.. global sequence screen screen =3D {} screen =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10}) screen =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) screen =3D append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) screen =3D append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) screen =3D append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) screen =3D append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) screen =3D append (screen,{50,7,"(y,n)"}) <----- apparently a short = item like this sets the length to 3 here...why I don't know! EU says that: screen [1][1] is 1 screen [1][2] is 3 screen [1][3] is "Customer Number+" but EU says screen[1][8] is out of bounds and I would have thought it = would be 5!! thanks for any ensight... ------=_NextPart_000_003D_01C115B2.5D538080 Content-Type: text/html; charset="Windows-1252" 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> <META content=3D"MSHTML 5.00.3105.105" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>I have found the problem. There was a short item and = EU thinks=20 the length of the sequence is the length of the shortest = element...</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> <DIV><FONT size=3D2>Can someone explain the structure here. EU = says screen=20 has a length of 3..</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>global sequence screen<BR> screen =3D = {}<BR> screen=20 =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10})<BR> screen=20 =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20})<BR> = screen =3D=20 append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30})<BR> = screen =3D=20 append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40})<BR> = screen =3D=20 append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50})<BR> = screen =3D=20 append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60})</FONT></DIV> <DIV> screen =3D append (screen,{50,7,"(y,n)"}) <----- = apparently a=20 short item like this sets the length to 3 here...why I don't know!</DIV> <DIV> </DIV> <DIV><FONT size=3D2>EU says that:</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> screen [1][1] is 1</FONT></DIV> <DIV><FONT size=3D2> screen [1][2] is 3</FONT></DIV> <DIV><FONT size=3D2> screen [1][3] is "Customer=20 Number+"</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>but EU says screen[1][8] is out of bounds and I = would have=20 thought it would be 5!!</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>thanks for any ensight...</FONT></DIV> ------=_NextPart_000_003D_01C115B2.5D538080--
3. Re: structure
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 26, 2001
- 382 views
This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C11628.C8AF0220 charset="Windows-1252" It is 5 on my machine. Here is the code I executed... global sequence screen screen =3D {} screen =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10}) screen =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) screen =3D append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) screen =3D append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) screen =3D append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) screen =3D append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) =20 =20 ? screen [1][1] --is 1 ? screen [1][2] --is 3 ? screen [1][3] --is "Customer Number+" ? screen [1][8] --is 5 Maybe you have a subtle bug elsewhere? ----- Original Message -----=20 From: gwalters at sc.rr.com=20 To: EUforum=20 Sent: Thursday, July 26, 2001 10:13 PM Subject: structure 3.. global sequence screen screen =3D {} screen =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10}) screen =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) screen =3D append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) screen =3D append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) screen =3D append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) screen =3D append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) EU says that: screen [1][1] is 1 screen [1][2] is 3 screen [1][3] is "Customer Number+" but EU says screen[1][8] is out of bounds and I would have thought it = would be 5!! thanks for any ensight... ..george Or send an email To: EUforum-unsubscribe at topica.com This email was sent to: ddparnell at bigpond.com ------=_NextPart_000_0009_01C11628.C8AF0220 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>It is 5 on my machine.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Here is the code I = executed...</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT size=3D2>global sequence screen<BR> screen =3D = {}<BR> screen=20 =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10})<BR> screen=20 =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20})<BR> = screen =3D=20 append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30})<BR> = screen =3D=20 append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40})<BR> = screen =3D=20 append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50})<BR> = screen =3D=20 append (screen,{ 40,7,"State: = ",0,1,7,99,2,0,0,0,60})<BR> </FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> <BR>? screen [1][1] --is=20 1<BR>? screen [1][2] --is 3<BR>? = screen=20 [1][3] --is "Customer Number+"<BR>? screen [1][8] --is = 5<BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Maybe you have a subtle bug = elsewhere?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dgwalters at sc.rr.com=20 href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DEUforum at topica.com=20 href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, July 26, 2001 = 10:13=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> structure</DIV> <A = <DIV><FONT size=3D2>global sequence screen<BR> screen =3D = {}<BR> =20 screen =3D append ( screen,{1,3,"Customer Number+=20 ",1,1,2,0,5,0,6,0,10})<BR> screen =3D append (screen,{ = 10,4,"Name..:=20 ",0,1,3,-99,40,0,0,0,20})<BR> screen =3D append (screen,{ = 10,5,"Addr 1:=20 ",0,1,4,-99,25,0,0,0,30})<BR> screen =3D append (screen,{ = 10,6,"Addr 2:=20 ",0,1,5,-99,25,0,0,0,40})<BR> screen =3D append (screen,{ = 10,7,"City..:=20 ",0,1,6,-99,20,0,0,0,50})<BR> screen =3D append (screen,{ = 40,7,"State:=20 ",0,1,7,99,2,0,0,0,60})</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>EU says that:</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> screen [1][1] is 1</FONT></DIV> <DIV><FONT size=3D2> screen [1][2] is 3</FONT></DIV> <DIV><FONT size=3D2> screen [1][3] is "Customer=20 Number+"</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>but EU says screen[1][8] is out of bounds and I = would have=20 thought it would be 5!!</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>thanks for any ensight...</FONT></DIV> <DIV> </DIV> <DIV><FONT = size=3D2>..george</FONT></DIV><PRE>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= <A = href=3D"http://topica.com/u/?b1dd66.${encoded_sub_id}">http://topica.com/= u/?b1dd66.b2mL5y</A> Or send an email To: EUforum-unsubscribe at topica.com This email was sent to: ddparnell at bigpond.com <A = ------=_NextPart_000_0009_01C11628.C8AF0220--
4. Re: structure
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 26, 2001
- 370 views
This is a multi-part message in MIME format. ------=_NextPart_000_0014_01C11629.8E9E6520 charset="Windows-1252" The length of the 7th screen element is 3. If I do a '? length(screen)' = I get 7. Are you sure you are testing the last element and not the = first? ----- Original Message -----=20 From: gwalters at sc.rr.com=20 To: EUforum=20 Sent: Thursday, July 26, 2001 11:07 PM Subject: structure Can someone explain the structure here. EU says screen has a length of = 3.. global sequence screen screen =3D {} screen =3D append ( screen,{1,3,"Customer Number+ = ",1,1,2,0,5,0,6,0,10}) screen =3D append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) screen =3D append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) screen =3D append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) screen =3D append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) screen =3D append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) screen =3D append (screen,{50,7,"(y,n)"}) <----- apparently a short = item like this sets the length to 3 here...why I don't know! EU says that: screen [1][1] is 1 screen [1][2] is 3 screen [1][3] is "Customer Number+" but EU says screen[1][8] is out of bounds and I would have thought it = would be 5!! thanks for any ensight... This email was sent to: ddparnell at bigpond.com ------=_NextPart_000_0014_01C11629.8E9E6520 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>The length of the 7th screen element is = 3. If I do=20 a '? length(screen)' I get 7. Are you sure you are testing the last = element and=20 not the first?</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dgwalters at sc.rr.com=20 href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DEUforum at topica.com=20 href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, July 26, 2001 = 11:07=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> structure</DIV> <A = <DIV> </DIV> <DIV><FONT size=3D2> <DIV><FONT size=3D2>Can someone explain the structure here. EU = says screen=20 has a length of 3..</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>global sequence screen<BR> screen =3D = {}<BR> =20 screen =3D append ( screen,{1,3,"Customer Number+=20 ",1,1,2,0,5,0,6,0,10})<BR> screen =3D append (screen,{ = 10,4,"Name..:=20 ",0,1,3,-99,40,0,0,0,20})<BR> screen =3D append (screen,{ = 10,5,"Addr 1:=20 ",0,1,4,-99,25,0,0,0,30})<BR> screen =3D append (screen,{ = 10,6,"Addr 2:=20 ",0,1,5,-99,25,0,0,0,40})<BR> screen =3D append (screen,{ = 10,7,"City..:=20 ",0,1,6,-99,20,0,0,0,50})<BR> screen =3D append (screen,{ = 40,7,"State:=20 ",0,1,7,99,2,0,0,0,60})</FONT></DIV> <DIV> screen =3D append (screen,{50,7,"(y,n)"}) <----- = apparently=20 a short item like this sets the length to 3 here...why I don't = know!</DIV> <DIV> </DIV> <DIV><FONT size=3D2>EU says that:</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2> screen [1][1] is 1</FONT></DIV> <DIV><FONT size=3D2> screen [1][2] is 3</FONT></DIV> <DIV><FONT size=3D2> screen [1][3] is "Customer=20 Number+"</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>but EU says screen[1][8] is out of bounds and I = would have=20 thought it would be 5!!</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>thanks for any ensight...</FONT></DIV> = <DIV> </DIV></FONT></DIV><PRE>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= <A = href=3D"http://topica.com/u/?b1dd66.${encoded_sub_id}">http://topica.com/= u/?b1dd66.b2mL5y</A> Or send an email To: EUforum-unsubscribe at topica.com This email was sent to: ddparnell at bigpond.com <A = ------=_NextPart_000_0014_01C11629.8E9E6520--
5. Re: structure
- Posted by irvm at ellijay.com Jul 26, 2001
- 377 views
On Thursday 26 July 2001 08:13, gwalters at sc.rr.com wrote: > Can someone explain the structure here. EU says screen has a length of 3.. > > global sequence screen > screen = {} > screen = append ( screen,{1,3,"Customer Number+ ",1,1,2,0,5,0,6,0,10}) > screen = append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) > screen = append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) > screen = append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) > screen = append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) > screen = append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) > > EU says that: > > screen [1][1] is 1 > screen [1][2] is 3 > screen [1][3] is "Customer Number+" > > but EU says screen[1][8] is out of bounds and I would have thought it would > be 5!! > > thanks for any ensight... Erm.. I copied and pasted your code, and Eu reports screen[1][8] as being 5. Regards, Irv
6. Re: structure
- Posted by irvm at ellijay.com Jul 26, 2001
- 384 views
On Thursday 26 July 2001 09:07, gwalters at sc.rr.com wrote: > I have found the problem. There was a short item and EU thinks the length > of the sequence is the length of the shortest element... No, it doesn't. Eu reports the length of screen, (again, copied and pasted from your e-mail, as 7. That's correct, there are seven elements, 1.Customer No, 2.Name, 3.Addr1, 4.Addr2, 5.City, 6.State, 7.(y/n) If you ask the length of screen[1], you'll get 12, and the length of screen[7] is 3. Regards, Irv > Can someone explain the structure here. EU says screen has a length of 3.. > > global sequence screen > screen = {} > screen = append ( screen,{1,3,"Customer Number+ ",1,1,2,0,5,0,6,0,10}) > screen = append (screen,{ 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}) > screen = append (screen,{ 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}) > screen = append (screen,{ 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}) > screen = append (screen,{ 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}) > screen = append (screen,{ 40,7,"State: ",0,1,7,99,2,0,0,0,60}) > screen = append (screen,{50,7,"(y,n)"}) <----- apparently a short item > like this sets the length to 3 here...why I don't know! > EU says that: > > screen [1][1] is 1 > screen [1][2] is 3 > screen [1][3] is "Customer Number+" > > but EU says screen[1][8] is out of bounds and I would have thought it would > be 5!! > > thanks for any ensight... >
8. Re: structure
- Posted by irvm at ellijay.com Jul 26, 2001
- 387 views
On Thursday 26 July 2001 09:35, gwalters at sc.rr.com wrote: > irv, you've hit it. each one can have a different length...problem is fixed > now..thanks all for your input.. That, of course, is one of Euphoria's advantages - you can pack pretty much anything you want into a sequence, without any arbitrary limits or having to pre-define the space. As an example, the 'normal' way to implement an A/R system is with two files: a customer file containing name, addr, balances, etc. and a transaction file, with current txns. With Euphoria, I tend to use just one file, which contains: (hope my indentation makes it thru EuForum intact) customer key -- customer info -- name -- addr -- balances -- current -- 30 -- 60 -- 90 -- customer txns (zero or more) -- inv # -- date -- amt... As customer makes purchases, the new purchase is just appended to his/her txns sequence. Number of transactions can be obtained by calling length(customer[txns]) Customer totals are computed by looping 1... length(txns), etc. This eliminates a lot of lookups and searching, since everything related is located within the one file. It also simplifies things such as deleting a customer account: if length(txns) > 0 or balance != 0 then error("Can't delete active account!") Backups are simple - one file to copy, as are statements. Reviewing a customer's account is verrry quick, as well. EOM reports are less quick, because you have to loop thru all customers and consolidate the data. Usually you're printing these reports, so there's plenty of time for processing while the printer chugs along. Starting a new period is just a matter of adjusting the 30/60/90, and then setting customer[x][txns] = {} You could keep the entire sequence of customers 'in-memory', but it's better to store these in a EDS database, since EDS will handle the lookup logic for you and ensure the use of unique keys automatically. Regards, Irv
9. Re: structure
- Posted by gwalters at sc.rr.com Jul 26, 2001
- 380 views
interesting...i'll think on it some.. ..george ----- Original Message ----- From: <irvm at ellijay.com> To: "EUforum" <EUforum at topica.com> Subject: Re: structure > > > On Thursday 26 July 2001 09:35, gwalters at sc.rr.com wrote: > > > irv, you've hit it. each one can have a different length...problem is fixed > > now..thanks all for your input.. > > That, of course, is one of Euphoria's advantages - you can pack > pretty much anything you want into a sequence, without any arbitrary > limits or having to pre-define the space. > > As an example, the 'normal' way to implement an A/R system is with > two files: a customer file containing name, addr, balances, etc. > and a transaction file, with current txns. > > With Euphoria, I tend to use just one file, which contains: > (hope my indentation makes it thru EuForum intact) > > customer key > -- customer info > -- name > -- addr > -- balances > -- current > -- 30 > -- 60 > -- 90 > -- customer txns (zero or more) > -- inv # > -- date > -- amt... > > As customer makes purchases, the new purchase is just appended to > his/her txns sequence. > > Number of transactions can be obtained by calling length(customer[txns]) > Customer totals are computed by looping 1... length(txns), etc. > > This eliminates a lot of lookups and searching, since everything related > is located within the one file. It also simplifies things such as deleting > a customer account: > if length(txns) > 0 > or balance != 0 then > error("Can't delete active account!") > > Backups are simple - one file to copy, as are statements. > Reviewing a customer's account is verrry quick, as well. > > EOM reports are less quick, because you have to loop thru all > customers and consolidate the data. Usually you're printing these > reports, so there's plenty of time for processing while the printer > chugs along. > > Starting a new period is just a matter of adjusting the 30/60/90, > and then setting customer[x][txns] = {} > > You could keep the entire sequence of customers 'in-memory', > but it's better to store these in a EDS database, since EDS will > handle the lookup logic for you and ensure the use of unique keys > automatically. > > Regards, > Irv > > > > >
10. Re: structure
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 26, 2001
- 389 views
Try this instead of the OnPaint method.... -------------- procedure SetupARF020() integer id for i = 1 to 99 do if screen[i][1] = 99 then exit end if x = screen[i][1]*9-8 y = screen[i][2]*18-45 xt = x + length(screen[i][3])*9-10 yt = y if screen[i][8]>0 then fl = screen[i][8]*9+9 else fl = 0 end if id = create(LText, screen[i][3],ARF020,x,y, 200, 25, 0) setFont(id, "Courier New",9,0) lbl = append(lbl,id ) if fl > 0 then id = create(EditText,"",ARF020,xt,yt,fl,20,0) setFont(id, "Courier New",8,0) sle = append(sle, id) end if end for end procedure -- Setup SFM name SetupARF020() WinMain(ARF020,Normal) ----------- This only creates the controls once and does run every time the window needs repainting. ----- Original Message ----- From: <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Sent: Friday, July 27, 2001 12:29 AM Subject: Re: structure > > > interesting...i'll think on it some.. > > ..george > > ----- Original Message ----- > From: <irvm at ellijay.com> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, July 26, 2001 10:21 AM > Subject: Re: structure > > > > > > > > On Thursday 26 July 2001 09:35, gwalters at sc.rr.com wrote: > > > > > irv, you've hit it. each one can have a different length...problem is > fixed > > > now..thanks all for your input.. > > > > That, of course, is one of Euphoria's advantages - you can pack > > pretty much anything you want into a sequence, without any arbitrary > > limits or having to pre-define the space. > > > > As an example, the 'normal' way to implement an A/R system is with > > two files: a customer file containing name, addr, balances, etc. > > and a transaction file, with current txns. > > > > With Euphoria, I tend to use just one file, which contains: > > (hope my indentation makes it thru EuForum intact) > > > > customer key > > -- customer info > > -- name > > -- addr > > -- balances > > -- current > > -- 30 > > -- 60 > > -- 90 > > -- customer txns (zero or more) > > -- inv # > > -- date > > -- amt... > > > > As customer makes purchases, the new purchase is just appended to > > his/her txns sequence. > > > > Number of transactions can be obtained by calling length(customer[txns]) > > Customer totals are computed by looping 1... length(txns), etc. > > > > This eliminates a lot of lookups and searching, since everything related > > is located within the one file. It also simplifies things such as deleting > > a customer account: > > if length(txns) > 0 > > or balance != 0 then > > error("Can't delete active account!") > > > > Backups are simple - one file to copy, as are statements. > > Reviewing a customer's account is verrry quick, as well. > > > > EOM reports are less quick, because you have to loop thru all > > customers and consolidate the data. Usually you're printing these > > reports, so there's plenty of time for processing while the printer > > chugs along. > > > > Starting a new period is just a matter of adjusting the 30/60/90, > > and then setting customer[x][txns] = {} > > > > You could keep the entire sequence of customers 'in-memory', > > but it's better to store these in a EDS database, since EDS will > > handle the lookup logic for you and ensure the use of unique keys > > automatically. > > > > Regards, > > Irv > > > > > > > > > > > > > > >
11. Re: structure
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 26, 2001
- 372 views
Also, can I suggest another way of defining your structure... global sequence screen screen = { { 1,3,"Customer Number+ ",1,1,2,0,5,0,6,0,10}, { 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}, { 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}, { 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}, { 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}, { 40,7,"State: ",0,1,7,99,2,0,0,0,60}, { 53,7,"Zip: ",0,1,8,99,10,0,0,0,70}, { 1,9,"Contact Nbr 1..: ",0,1,10,-99,30,0,0,0,80}, { 1,10,"Contact Nbr 2..: ",0,1,11,-99,30,0,0,0,90}, { 50,9,"Phone: ",0,1,9,99,17,0,0,0,100}, { 50,10,"FAX..: ",0,1,32,99,17,0,0,0,110}, { 50,11,"Email: ",0,1,34,-99,24,0,11,0,110}, { 1,12,"Salesman Number: ",1,1,12,0,3,0,12,0,120}, { 1,13,"Statements(Y/N): ",1,1,23,96,1,0,0,5,130}, { 1,14,"Tax Auth Code..+ ",1,1,24,99,2,0,4,1,140}, { 25,14,"Taxable: ",1,1,30,96,1,0,0,2,150}, { 36,14,"(Y/N)",0,0,0,0,0,0,0,0,0}, { 1,15,"Tax Id.........: ",0,1,33,99,16,0,0,0,150}, { 1,16,"Default Shp Via+ ",1,1,42,99,2,0,7,0,190}, { 25,16,"FOB....+ ",1,1,43,99,2,0,8,0,190}, {1,17,"Customer Group.: ",0,1,26,99,2,0,0,0,160}, {1,18,"Cust Price Lvl.: ",1,1,14,0,2,0,2,3,170}, {25,18,"Prod Price Tbl: ",0,1,31,99,2,0,9,0,180}, {1,19,"Payment Terms..+ ",1,1,29,99,2,0,5,0,190}, {1,20,"Credit Limit...: ",0,1,27,2,10,0,0,0,200}, {1,21,"Fin Chg (Y/N)..: ",1,1,25,96,1,0,0,4,210}, {25,21,"Bill-to Cust #: ",0,1,13,0,5,0,3,0,220}, {1,22,"Elec. Invoice..: ",0,1,35,99,1,0,10,0,220}, {21,22,"(N,E,F)",0,0,0,0,0,0,0,0,0}, {50,12,"Last Invoice Dt.: ",0,1,15,98,8,1,0,0,230}, {50,13,"Last Invoice Amt: ",0,1,16,2,9,1,0,0,240}, {50,14,"Last Payment Dt.: ",0,1,17,98,8,1,0,0,250}, {50,15,"Last Payment Amt: ",0,1,18,2,9,1,0,0,260}, {50,17,"Avg Days to Pay.: ",0,1,21,0,4,1,0,0,270}, {50,18,"Invoices Paid...: ",0,1,20,0,4,1,0,0,280}, {50,19,"Current Balance.: ",0,1,22,2,9,1,0,0,290}, {50,20,"YTD Sales.......: ",0,1,19,2,9,1,0,0,300}, {50,21,"Last Year Sales.: ",0,1,28,2,9,1,0,0,310}, {50,22,"Date Cust Added.: ",0,1,38,98,8,0,1,0,310}, {99,0,"",0,0,0,0,0,0,0,0,0} } this is probably faster than all those append statements. ----- Original Message ----- From: <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Sent: Friday, July 27, 2001 12:29 AM Subject: Re: structure > > > > interesting...i'll think on it some.. > > ..george > > ----- Original Message ----- > From: <irvm at ellijay.com> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, July 26, 2001 10:21 AM > Subject: Re: structure > > > > > > > > On Thursday 26 July 2001 09:35, gwalters at sc.rr.com wrote: > > > > > irv, you've hit it. each one can have a different length...problem is > fixed > > > now..thanks all for your input.. > > > > That, of course, is one of Euphoria's advantages - you can pack > > pretty much anything you want into a sequence, without any arbitrary > > limits or having to pre-define the space. > > > > As an example, the 'normal' way to implement an A/R system is with > > two files: a customer file containing name, addr, balances, etc. > > and a transaction file, with current txns. > > > > With Euphoria, I tend to use just one file, which contains: > > (hope my indentation makes it thru EuForum intact) > > > > customer key > > -- customer info > > -- name > > -- addr > > -- balances > > -- current > > -- 30 > > -- 60 > > -- 90 > > -- customer txns (zero or more) > > -- inv # > > -- date > > -- amt... > > > > As customer makes purchases, the new purchase is just appended to > > his/her txns sequence. > > > > Number of transactions can be obtained by calling length(customer[txns]) > > Customer totals are computed by looping 1... length(txns), etc. > > > > This eliminates a lot of lookups and searching, since everything related > > is located within the one file. It also simplifies things such as deleting > > a customer account: > > if length(txns) > 0 > > or balance != 0 then > > error("Can't delete active account!") > > > > Backups are simple - one file to copy, as are statements. > > Reviewing a customer's account is verrry quick, as well. > > > > EOM reports are less quick, because you have to loop thru all > > customers and consolidate the data. Usually you're printing these > > reports, so there's plenty of time for processing while the printer > > chugs along. > > > > Starting a new period is just a matter of adjusting the 30/60/90, > > and then setting customer[x][txns] = {} > > > > You could keep the entire sequence of customers 'in-memory', > > but it's better to store these in a EDS database, since EDS will > > handle the lookup logic for you and ensure the use of unique keys > > automatically. > > > > Regards, > > Irv > > > > > > > > > > > > > > > > >
12. Re: structure
- Posted by gwalters at sc.rr.com Jul 26, 2001
- 382 views
that's very neat... thanks.. ..george ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: structure > > > Also, can I suggest another way of defining your structure... > > global sequence screen > screen = { > { 1,3,"Customer Number+ ",1,1,2,0,5,0,6,0,10}, > { 10,4,"Name..: ",0,1,3,-99,40,0,0,0,20}, > { 10,5,"Addr 1: ",0,1,4,-99,25,0,0,0,30}, > { 10,6,"Addr 2: ",0,1,5,-99,25,0,0,0,40}, > { 10,7,"City..: ",0,1,6,-99,20,0,0,0,50}, > { 40,7,"State: ",0,1,7,99,2,0,0,0,60}, > { 53,7,"Zip: ",0,1,8,99,10,0,0,0,70}, > { 1,9,"Contact Nbr 1..: ",0,1,10,-99,30,0,0,0,80}, > { 1,10,"Contact Nbr 2..: ",0,1,11,-99,30,0,0,0,90}, > { 50,9,"Phone: ",0,1,9,99,17,0,0,0,100}, > { 50,10,"FAX..: ",0,1,32,99,17,0,0,0,110}, > { 50,11,"Email: ",0,1,34,-99,24,0,11,0,110}, > { 1,12,"Salesman Number: ",1,1,12,0,3,0,12,0,120}, > { 1,13,"Statements(Y/N): ",1,1,23,96,1,0,0,5,130}, > { 1,14,"Tax Auth Code..+ ",1,1,24,99,2,0,4,1,140}, > { 25,14,"Taxable: ",1,1,30,96,1,0,0,2,150}, > { 36,14,"(Y/N)",0,0,0,0,0,0,0,0,0}, > { 1,15,"Tax Id.........: ",0,1,33,99,16,0,0,0,150}, > { 1,16,"Default Shp Via+ ",1,1,42,99,2,0,7,0,190}, > { 25,16,"FOB....+ ",1,1,43,99,2,0,8,0,190}, > {1,17,"Customer Group.: ",0,1,26,99,2,0,0,0,160}, > {1,18,"Cust Price Lvl.: ",1,1,14,0,2,0,2,3,170}, > {25,18,"Prod Price Tbl: ",0,1,31,99,2,0,9,0,180}, > {1,19,"Payment Terms..+ ",1,1,29,99,2,0,5,0,190}, > {1,20,"Credit Limit...: ",0,1,27,2,10,0,0,0,200}, > {1,21,"Fin Chg (Y/N)..: ",1,1,25,96,1,0,0,4,210}, > {25,21,"Bill-to Cust #: ",0,1,13,0,5,0,3,0,220}, > {1,22,"Elec. Invoice..: ",0,1,35,99,1,0,10,0,220}, > {21,22,"(N,E,F)",0,0,0,0,0,0,0,0,0}, > {50,12,"Last Invoice Dt.: ",0,1,15,98,8,1,0,0,230}, > {50,13,"Last Invoice Amt: ",0,1,16,2,9,1,0,0,240}, > {50,14,"Last Payment Dt.: ",0,1,17,98,8,1,0,0,250}, > {50,15,"Last Payment Amt: ",0,1,18,2,9,1,0,0,260}, > {50,17,"Avg Days to Pay.: ",0,1,21,0,4,1,0,0,270}, > {50,18,"Invoices Paid...: ",0,1,20,0,4,1,0,0,280}, > {50,19,"Current Balance.: ",0,1,22,2,9,1,0,0,290}, > {50,20,"YTD Sales.......: ",0,1,19,2,9,1,0,0,300}, > {50,21,"Last Year Sales.: ",0,1,28,2,9,1,0,0,310}, > {50,22,"Date Cust Added.: ",0,1,38,98,8,0,1,0,310}, > {99,0,"",0,0,0,0,0,0,0,0,0} > } > > this is probably faster than all those append statements. > > ----- Original Message ----- > From: <gwalters at sc.rr.com> > To: "EUforum" <EUforum at topica.com> > Sent: Friday, July 27, 2001 12:29 AM > Subject: Re: structure > > > > > > > > > interesting...i'll think on it some.. > > > > ..george > > > > ----- Original Message ----- > > From: <irvm at ellijay.com> > > To: "EUforum" <EUforum at topica.com> > > Sent: Thursday, July 26, 2001 10:21 AM > > Subject: Re: structure > > > > > > > > > > > > > On Thursday 26 July 2001 09:35, gwalters at sc.rr.com wrote: > > > > > > > irv, you've hit it. each one can have a different length...problem is > > fixed > > > > now..thanks all for your input.. > > > > > > That, of course, is one of Euphoria's advantages - you can pack > > > pretty much anything you want into a sequence, without any arbitrary > > > limits or having to pre-define the space. > > > > > > As an example, the 'normal' way to implement an A/R system is with > > > two files: a customer file containing name, addr, balances, etc. > > > and a transaction file, with current txns. > > > > > > With Euphoria, I tend to use just one file, which contains: > > > (hope my indentation makes it thru EuForum intact) > > > > > > customer key > > > -- customer info > > > -- name > > > -- addr > > > -- balances > > > -- current > > > -- 30 > > > -- 60 > > > -- 90 > > > -- customer txns (zero or more) > > > -- inv # > > > -- date > > > -- amt... > > > > > > As customer makes purchases, the new purchase is just appended to > > > his/her txns sequence. > > > > > > Number of transactions can be obtained by calling length(customer[txns]) > > > Customer totals are computed by looping 1... length(txns), etc. > > > > > > This eliminates a lot of lookups and searching, since everything related > > > is located within the one file. It also simplifies things such as > deleting > > > a customer account: > > > if length(txns) > 0 > > > or balance != 0 then > > > error("Can't delete active account!") > > > > > > Backups are simple - one file to copy, as are statements. > > > Reviewing a customer's account is verrry quick, as well. > > > > > > EOM reports are less quick, because you have to loop thru all > > > customers and consolidate the data. Usually you're printing these > > > reports, so there's plenty of time for processing while the printer > > > chugs along. > > > > > > Starting a new period is just a matter of adjusting the 30/60/90, > > > and then setting customer[x][txns] = {} > > > > > > You could keep the entire sequence of customers 'in-memory', > > > but it's better to store these in a EDS database, since EDS will > > > handle the lookup logic for you and ensure the use of unique keys > > > automatically. > > > > > > Regards, > > > Irv > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >