1. Even more basic stuff...

O.k., o.k., here we go again...

I know that new sequences can be added to other sequences using the
APPEND and PREPEND syntax. However, I was wondering if there was any
way to delete a sequence from a larger sequence. I am now making a
Nibbles-type game (very easy on Euphoria!), and this information
would be VERY helpful.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=-=
The Reaper                                    |||||||||||
reaper at auracom.com                            $  @   @  $
"This is not a quote."                         \   !   /
Or is it?                                       \=====/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=-

(yes, the signature does need work...)

new topic     » topic index » view message » categorize

2. Even more basic stuff...

Mon 13-01 The Reaper wrote:

> know that new sequences can be added to other sequences using the
>APPEND and PREPEND syntax. However, I was wondering if there was any
>way to delete a sequence from a larger sequence.

Hello,

If the sequences are one-dimensional, it is very easy.
Suppose you have a sequence s with n elements.

s = s[m..n] where m<n will delete de first m-1 elements from the sequence.
s = s[1..m] will delete the elements m+1 to n.
And if you want to delete a subsequence from the middle of s, you have to
combine the above mentioned forms and then append the second subsequence to
the first.
Of course you have to use (temporal) variables to store the subsequences.
As far as my knowledge reaches, this seems to be the way to solve your
problem.

Ad Rienks

adrienks at hotmail.com

new topic     » goto parent     » topic index » view message » categorize

3. Even more basic stuff...

Hello Reaper (again)

>I know that new sequences can be added to other sequences using the
>APPEND and PREPEND syntax. However, I was wondering if there was any
>way to delete a sequence from a larger sequence.

I have to apologize. The third part of the answer I gave you before is not
correct. It is even easier! To delete a sequence from another sequence you
only have to use '&'.
So:

s = s[1..k] & s[m..n], where k<m<n.

Sorry!

Ad Rienks

adrienks at hotmail.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: Even more basic stuff...

At 12:48  13/01/97 -0500, you wrote:
>(you know what you wrote, so why tell everybody?)

Hey! Thanks for (all) the info! This mailing list really DOES work!
Now I can make my game (called Snakers!!) without having a 1000 sequence
long variable(long story!). Now its time to show Mr. I-love-turbo-pascal
Izchak Aronov how wicked a programming language Euphoria really is!!!
I'll try to contribute my fair share of help on this mailing list, but
I new to this language, so bear with me.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=-=
The Reaper                                    |||||||||||
reaper at auracom.com                            $  @   @  $
"This is not a quote."                         \   !   /
Or is it?                                       \=====/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=-=-

(yes, the signature does need work...)

new topic     » goto parent     » topic index » view message » categorize

5. Re: Even more basic stuff...

Hi Reaper,

I know what I wrote, and I hope it helps you. Hope to hear from you again
real soon.
Our Israeli friend can now see a strong feature of Euphoria, called dynamic
allocation, which I think is not easily applicable in Pascal, C, or
(almost) any language I heard of. Lots of succes in programming.

Ad Rienks

ad rienks at hotmail.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu