1. RE: Using squences with a for lop
- Posted by Ron Austin <ronaustin at alltel.net> Oct 25, 2003
- 356 views
Thank you everybody. I Figured out that the sequence had to be initalized, but I didn't know how to do it, cause data[1}="" sure don't work. Now I use the repeat command to initalize it and it's working great! Greg Haberek wrote: > > > stupd Ctrl+Enter!! I was fumbling around my keyboard and accidently sent > the > last post too early! > here's what's left: > > > sequence Lbl, Data > Lbl = {} -- initialize with empty value > Data = {} > > Lbl = resizeSeq( Lbl, 2, 0 ) -- same as Lbl &= repeat(0, 2) or Lbl &= > {0,0} > > Lbl[1] = create(LText,"Code",Win,20,50,60,20,0), > Data[1] = create(EditText,"",Win,100,50,42,20,ES_UPPERCASE), > > Lbl[2] = create(LText,"Description",Win,20,80,60,20,0), > Data[2] = create(EditText,"",Win,100,80,278,20,ES_UPPERCASE) > > -- an easier way to do the above, however, is just using &= > > sequence Lbl, Data > Lbl = {} > Data = {} > > Lbl &= create(LText,"Code",Win,20,50,60,20,0), > Data &= create(EditText,"",Win,100,50,42,20,ES_UPPERCASE), > > Lbl &= create(LText,"Description",Win,20,80,60,20,0), > Data &= create(EditText,"",Win,100,80,278,20,ES_UPPERCASE) > > > ----- Original Message ----- > From: "Ron Austin" <ronaustin at alltel.net> > To: <EUforum at topica.com> > Sent: Saturday, October 25, 2003 9:43 AM > Subject: Using squences with a for lop > > > > I have made a simple program which stores a couple of fields > > > > - snip > > constant > > Lbl1 = create(LText,"Code",Win,20,50,60,20,0), > > Code = create(EditText,"",Win,100,50,42,20,ES_UPPERCASE), > > > > Lbl2 = create(LText,"Description",Win,20,80,60,20,0), > > Desc = create(EditText,"",Win,100,80,278,20,ES_UPPERCASE), > > > > --snip > > > > err = db_select_table("Diagnosis") > > err = db_insert(getText(Code),Diag_Data) > > --snip > > > > Which is working okay with a couple of fields, but what if I want to > > store 10, or 100? > > > > I know the answer is to use sequences and a for loop. I can get data > > out of a sequence using [], but how do you get it in? > > > > I tried this and that didn't work > > > > sequence > > > > Lbl1 = create(LText,"Code",Win,20,50,60,20,0), > > data[1] = create(EditText,"",Win,100,50,42,20,ES_UPPERCASE), > > > > Lbl2 = create(LText,"Description",Win,20,80,60,20,0), > > data[2] = create(EditText,"",Win,100,80,278,20,ES_UPPERCASE) > > > > I've read the manual and looked at programs, but I can't figure this > > out. I need to get this program running and I'm stuck. > > > > > > TOPICA - Start your own email discussion group. FREE! > > > >
2. RE: Using squences with a for lop
- Posted by Ron Austin <ronaustin at alltel.net> Oct 26, 2003
- 362 views
Derek Parnell wrote: > > > >----- Original Message ----- > >From: "Ron Austin" <ronaustin at alltel.net> > >To: <EUforum at topica.com> > >Sent: Monday, October 27, 2003 5:20 AM > >Subject: Re: Using squences with a for lop > > Ron, whatever email client you are using, please adjust it to use text > only. The above four lines is the ONLY thing I can see in your message > (again). > > -- > Derek > > I've set my e-mail to Western European (Windows) about 13 times and when > I checked it just now it says Western European (ISO). Looks like the > best thing for me to do is not reply to the e-mail directly, but go to > the Euphoria site (where I am now) to make my reply. Here's the text > that evaporated: Thanks Stewart and the rest of you who offered solutions. I have to forget my 20 years programing in basic and start thinking in Euphoria. I probably will have a lot more questions before I master this language. At least I am getting further than I did in Access and Virtual Basic. > >