Bug ?

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

Hy,

global function remove_place(sequence s,integer m)
if m=1 then
 s=s[2..length(s)]
elsif m=length(s) then
 s=s[1..length(s)-1]
else
 s = s[1..m-1] & s[m+1..length(s)]
end if
return s
end function

Mister Craig said that in this function there were
not special cases needed, you only needed :

global function remove_place(sequence s,integer m)
 return s = s[1..m-1] & s[m+1..length(s)]
end function

I tried it,
what did I get :
ERROR! slice ends past end of sequence (4 > 3)
etc.

Bug or is R.Craig a lier, or didn't I understand
it right (as always)....

Bye,
PQ
QC

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu