Re: Euphoria 2.5

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

Igor, your version of s[length(s)] doesn't quite work perfectly...

Run this:
-- start of code
include get.e

sequence junk

integer A_
type sequence_with_length_A(sequence a)
  A_= length(a)
  return sequence(a)
end type

sequence_with_length_A A_A, A_B, A_C

A_A = "Hello"
A_B = "World"
A_C = "Goodbye!"

?A_A[A_]
?A_B[A_]
?A_C[A_]

--end of code

Sure, you could define B_ and C_, but what happens when you have
a billion sequences? :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

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

Search



Quick Links

User menu

Not signed in.

Misc Menu