RE: Live Tutoria?

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

Lynn Kilroy wrote:
> This is okay.  I like it, and it isn't that hard to understand.  I 
> learned it from what you showed me and could guess at it's meaning.  How 
> do I drop a character off the end of the array/sequence?

Like this:
new = old[1..length(old)-1] -- for Euphoria 2.4 and below
--or--
new = old[1..$-1] -- for Euphoria 2.5

The '$' is a shortcut for length() and is very useful. Length still works,
though, so you can still use it if you prefer or if it makes your code more
clear.

You can probably also guess how to remove an element from the beginning. Can you
think of how to take one out of the middle?

--
"The author regrets that he is unable to reconcile himself to the
thoughtful point of view you have expressed. However, it must be kept
in mind that being raised in different cultures and different places can
result in such differences of viewpoint between individuals.
The author is from planet Earth." [author unknown]

j.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu