1. DAHH another question
- Posted by Bernie Ryan <bwryan at PCOM.NET> May 13, 1999
- 466 views
I have a sequence {a,b,c} -- how do i append or concantenate two zeros to it to get this result {a,b,c,0,0}
2. Re: DAHH another question
- Posted by nick <metcalfn at ALPHALINK.COM.AU> May 14, 1999
- 447 views
Try the following: d = {a, b, c} & {0, 0} same as: e = {a, b, c} f = {0, 0} d = e & f The & concantenate operator drops the inside brackets. Cheers, Nick Bernie Ryan wrote: > I have a sequence {a,b,c} > > -- how do i append or concantenate two zeros to it > > to get this result {a,b,c,0,0}
3. Re: DAHH another question
- Posted by "C. K. Lester" <cklester at TICNET.COM> May 13, 1999
- 436 views
At 01:23 PM 5/13/99 -0400, you wrote: >I have a sequence {a,b,c} > >-- how do i append or concantenate two zeros to it > >to get this result {a,b,c,0,0} Doesn't '&' accomplish this? --proof positive program sequence x, z, new atom y x = {1,2,3} y = 0 z = {0,0} ? x & y -- prints {1,2,3,0} ? x & z -- prints {1,2,3,0,0} ? append(x, y) -- prints {1,2,3,0} ? append(x, z) -- prints {1,2,3,{0,0}} Don't use append when you're appending a sequence... otherwise, you'll get what you see.
4. Re: DAHH another question
- Posted by "C. K. Lester" <cklester at TICNET.COM> May 13, 1999
- 448 views
Nick! Where the heck is it 3:58AM on 5/14/99 (the date of your message)? At 03:58 AM 5/14/99 +1000, you wrote: >Try the following: > >d = {a, b, c} & {0, 0} > >same as: > >e = {a, b, c} >f = {0, 0} > >d = e & f > >The & concantenate operator drops the inside brackets. > >Cheers, >Nick > >Bernie Ryan wrote: > >> I have a sequence {a,b,c} >> >> -- how do i append or concantenate two zeros to it >> >> to get this result {a,b,c,0,0}
5. Re: DAHH another question
- Posted by Bernie Ryan <bwryan at PCOM.NET> May 13, 1999
- 500 views
Thanks everybody for your help ! PS: Nick you better change your clock chip or CMOS battery.
6. Re: DAHH another question
- Posted by nick <metcalfn at ALPHALINK.COM.AU> May 15, 1999
- 446 views
Hi, C.K. My insane lifestyle usually means I am online in the wee short hours here in Oz. This may correspond convieniently or not to around high noon in the states. Sorry it causes strange confusions.... 8?, --Nick C. K. Lester wrote: > Nick! Where the heck is it 3:58AM on 5/14/99 (the date of your message)? > > At 03:58 AM 5/14/99 +1000, you wrote: > >Try the following: > > > >d = {a, b, c} & {0, 0} > > > >same as: > > > >e = {a, b, c} > >f = {0, 0} > > > >d = e & f > > > >The & concantenate operator drops the inside brackets. > > > >Cheers, > >Nick > > > >Bernie Ryan wrote: > > > >> I have a sequence {a,b,c} > >> > >> -- how do i append or concantenate two zeros to it > >> > >> to get this result {a,b,c,0,0}