1. Request for Eu 2.4
- Posted by Greg Haberek <g.haberek at comcast.net> Feb 02, 2003
- 559 views
Rob, I would possibly like to see a way to index individual parts of a sequence.. Here is an example: -- begin example code -- sequence my_stuff my_stuff = "ABCDEFG" ? my_stuff[ 2, 4, 6 ] -- output: "BDF" -- rather than: ? my_stuff[2] & my_stuff[4] & my_stuff[6] -- output: "BDF" -- end example code -- right now I use a function, but this may make a nice feature ~Greg g.haberek at comcast.net
2. Re: Request for Eu 2.4
- Posted by xerox_irs at lvcm.com Feb 02, 2003
- 503 views
I purpose somthing like sequence a,b a={1,2,3,4,5} b={1,3,5} ? a[{1,3,5}] ? a[b] outputs being {1,3,5} {1,3,5} ----- Original Message ----- From: Greg Haberek <g.haberek at comcast.net> To: EUforum <EUforum at topica.com> Sent: Sunday, February 02, 2003 11:22 AM Subject: Request for Eu 2.4 > > Rob, > I would possibly like to see a way to index individual parts of a sequence.. > > Here is an example: > > -- begin example code -- > sequence my_stuff > > my_stuff = "ABCDEFG" > > ? my_stuff[ 2, 4, 6 ] > -- output: "BDF" > > -- rather than: > > ? my_stuff[2] & my_stuff[4] & my_stuff[6] > -- output: "BDF" > > -- end example code -- > > > right now I use a function, but this may make a nice feature > > ~Greg > g.haberek at comcast.net > > > > TOPICA - Start your own email discussion group. FREE! >
3. Re: Request for Eu 2.4
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Feb 03, 2003
- 528 views
On Sun, 02 Feb 2003 14:22:47 -0500, Greg Haberek <g.haberek at comcast.net> wrote: >I would possibly like to see a way to index individual parts of a = sequence.. You could just code something like: function subset(sequence s, sequence iset) sequence result result =3D repeat(0,length(iset)) for i =3D 1 to length(iset) do result[i]=3Ds[iset[i]] end for return result end function puts(1,subset(my_stuff,{2,4,6})) (? would output {66,68,70}) Pete
4. Re: Request for Eu 2.4
- Posted by xerox_irs at lvcm.com Feb 03, 2003
- 482 views
something else taht would be great is if this atom a,b,c,d sequence z z={1,2,3,4} {a,b,c,d}=z so that a=1, b=2, c=3,d=4 that would be cool!!!!!!!!! ----- Original Message ----- From: <xerox_irs at lvcm.com> Subject: Re: Request for Eu 2.4 > > I purpose somthing like > sequence a,b > a={1,2,3,4,5} > b={1,3,5} > ? a[{1,3,5}] > ? a[b] > > outputs being > {1,3,5} > {1,3,5} > > ----- Original Message ----- > From: Greg Haberek <g.haberek at comcast.net> > To: EUforum <EUforum at topica.com> > Sent: Sunday, February 02, 2003 11:22 AM > Subject: Request for Eu 2.4 > > > > Rob, > > I would possibly like to see a way to index individual parts of a > sequence.. > > > > Here is an example: > > > > -- begin example code -- > > sequence my_stuff > > > > my_stuff = "ABCDEFG" > > > > ? my_stuff[ 2, 4, 6 ] > > -- output: "BDF" > > > > -- rather than: > > > > ? my_stuff[2] & my_stuff[4] & my_stuff[6] > > -- output: "BDF" > > > > -- end example code -- > > > > > > right now I use a function, but this may make a nice feature > > > > ~Greg > > g.haberek at comcast.net > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > TOPICA - Start your own email discussion group. FREE! >
5. Re: Request for Eu 2.4
- Posted by jbrown1050 at hotpop.com Feb 04, 2003
- 512 views
I agree. Also, perhaps this idea should be thrown to the OpenEU mailing list, and see what happens there? jbrown On Mon, Feb 03, 2003 at 03:31:27PM -0800, xerox_irs at lvcm.com wrote: > > something else taht would be great is if this > atom a,b,c,d > sequence z > z={1,2,3,4} > {a,b,c,d}=z > so that a=1, b=2, c=3,d=4 that would be cool!!!!!!!!! > > ----- Original Message ----- > From: <xerox_irs at lvcm.com> > To: EUforum <EUforum at topica.com> > Sent: Sunday, February 02, 2003 2:19 PM > Subject: Re: Request for Eu 2.4 > > > > I purpose somthing like > > sequence a,b > > a={1,2,3,4,5} > > b={1,3,5} > > ? a[{1,3,5}] > > ? a[b] > > > > outputs being > > {1,3,5} > > {1,3,5} > > > > ----- Original Message ----- > > From: Greg Haberek <g.haberek at comcast.net> > > To: EUforum <EUforum at topica.com> > > Sent: Sunday, February 02, 2003 11:22 AM > > Subject: Request for Eu 2.4 > > > > > > > Rob, > > > I would possibly like to see a way to index individual parts of a > > sequence.. > > > > > > Here is an example: > > > > > > -- begin example code -- > > > sequence my_stuff > > > > > > my_stuff = "ABCDEFG" > > > > > > ? my_stuff[ 2, 4, 6 ] > > > -- output: "BDF" > > > > > > -- rather than: > > > > > > ? my_stuff[2] & my_stuff[4] & my_stuff[6] > > > -- output: "BDF" > > > > > > -- end example code -- > > > > > > > > > right now I use a function, but this may make a nice feature > > > > > > ~Greg > > > g.haberek at comcast.net > > > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon | \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME |
6. Re: Request for Eu 2.4
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 04, 2003
- 661 views
On Mon, 3 Feb 2003 18:54:54 -0500, <jbrown1050 at hotpop.com> wrote: > > I agree. > > Also, perhaps this idea should be thrown to the OpenEU mailing list, > and see what happens there? > > jbrown > > On Mon, Feb 03, 2003 at 03:31:27PM -0800, xerox_irs at lvcm.com wrote: >> >> something else taht would be great is if this >> atom a,b,c,d >> sequence z >> z={1,2,3,4} >> {a,b,c,d}=z >> so that a=1, b=2, c=3,d=4 that would be cool!!!!!!!!! >> [snip] It already has. Its the desequencing operator idea. object a,b,c,d sequence z z={1,2,3,4} |a,b,c,d| ?= z Also the slice extention that caters for... y = z[3,4,1..2] that would return a sequence {3, 4, {1,2}} So that together you could do.. |a,b| ?= z[2,4] which is equivalent to ... a = z[2] b = z[4] The special desequencing operation '?=' is needed 'cos we also want to do this... |a,b,c,d| = z which would assign all of z to each of a, b, c, and d. -- cheers, Derek Parnell
7. Re: Request for Eu 2.4
- Posted by xerox_irs at lvcm.com Feb 05, 2003
- 518 views
Another thing that would be good is if you could assign a variable a part of another so atom a sequence b b={1,2,3,4} a=assign(b,2) a=5 now b={1,5,3,4} b[2]=7 now a=7 and if b[2]={2} then it gives a type check error because "a" is an "atom" !!!! that would be very very useful, and faster!!!!! than always subscripting ----- Original Message ----- From: <xerox_irs at lvcm.com> To: EUforum <EUforum at topica.com> Sent: Monday, February 03, 2003 3:31 PM Subject: Re: Request for Eu 2.4 > > something else taht would be great is if this > atom a,b,c,d > sequence z > z={1,2,3,4} > {a,b,c,d}=z > so that a=1, b=2, c=3,d=4 that would be cool!!!!!!!!! > > ----- Original Message ----- > From: <xerox_irs at lvcm.com> > To: EUforum <EUforum at topica.com> > Sent: Sunday, February 02, 2003 2:19 PM > Subject: Re: Request for Eu 2.4 > > > > I purpose somthing like > > sequence a,b > > a={1,2,3,4,5} > > b={1,3,5} > > ? a[{1,3,5}] > > ? a[b] > > > > outputs being > > {1,3,5} > > {1,3,5} > > > > ----- Original Message ----- > > From: Greg Haberek <g.haberek at comcast.net> > > To: EUforum <EUforum at topica.com> > > Sent: Sunday, February 02, 2003 11:22 AM > > Subject: Request for Eu 2.4 > > > > > > > Rob, > > > I would possibly like to see a way to index individual parts of a > > sequence.. > > > > > > Here is an example: > > > > > > -- begin example code -- > > > sequence my_stuff > > > > > > my_stuff = "ABCDEFG" > > > > > > ? my_stuff[ 2, 4, 6 ] > > > -- output: "BDF" > > > > > > -- rather than: > > > > > > ? my_stuff[2] & my_stuff[4] & my_stuff[6] > > > -- output: "BDF" > > > > > > -- end example code -- > > > > > > > > > right now I use a function, but this may make a nice feature > > > > > > ~Greg > > > g.haberek at comcast.net > > > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > TOPICA - Start your own email discussion group. FREE! >
8. Re: Request for Eu 2.4
- Posted by gertie at visionsix.com Feb 05, 2003
- 507 views
On 4 Feb 2003, at 21:30, xerox_irs at lvcm.com wrote: > > Another thing that would be good is if you could assign a variable a part > of > another so > atom a > sequence b > > b={1,2,3,4} > a=assign(b,2) > a=5 > now b={1,5,3,4} > b[2]=7 > now a=7 This is what we used pointers for in the bad ole days. Pointing into records, pointers for multiple typecasting, pointers for indexing. Kat