Re: Sequence Slicing (Was RE: Tough ciphers?)

new topic     » goto parent     » topic index » view thread      » older message » newer message

> ----- Original Message ----- 
> From: "C. K. Lester" <cklester at yahoo.com>
> > They are of the pattern
> > 
> >     x = x[a+1..length(x)]
> 

Woops, made a mistake in the first one lets try again...

Lets see if this works now.

sequence z
 
 integer aout
aout = a + 1
 
 integer lenx
lenx = length(x) - aout
 
 z = repeat(0, lenx)
 
 for i = 1 to lenx do
      z[i] = x[i]
end for
 
 x = z
 
 -- or just leave it z instead of the extra copy if you want!
 
BTW, completly untested to work or for speed but I imagine this might be
 faster.......
 
 Euman

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu