RE: Standard Euphoria Library Project

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

Irv Mullins wrote:
> You've somewhat underestimated Euphoria's abilities - all you really 
> need is:
> sequence s
> 
> function remove(integer x, sequence s)
> if x < 1 or x > length(s) then return s
> end if
> return s[1..x-1]&s[x+1..length(s)]
> end function
> 

Looks good to me Irv.

Mainly, when using any function like this, some sort of
range checking is always desirable in order to reduce
errors that cause the program to hault.

Good luck with it.
--Al

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

Search



Quick Links

User menu

Not signed in.

Misc Menu