Strange behavior in sequence handling

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

Hello everybody,

I'm a newcomer to Euphoria but I immediately found it interesting enough to
spend the few bucks that entitle you as a registered supporter. BTW are there
Euphoria T-shirts or something?

Now let's come to my first contribution (ahem) to this forum.

Can somebody try the following and tell me if he/she gets the same weird
behavior:

sequence L
with trace
trace(1)
-- OK
L = {'a', 'b', 'z'}
L = {L, 1, 2}
L = {L, 4, 5}
-- probably OK all along the line

-- Weird
L = {'a', 'b', 'z'}
L[1] = L		-- Still OK
L[1][1] = L	-- Wow! Is this LISP or Prolog or something?
trace(0)

It might be that I missed a subtlety of the language (I'm a newbie after all),
but I would rather suspect that Euphoria has trapped itself in some of its
optimizations in the internal representation of sequences, somewhere deep down in
its guts.

Anyway have a nice day, all of you!

Henri from Belgium

PS: I apologize for my pidgin English. My mother tongue is French. So let's all
talk Euphorian.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu