wishlist

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

Well, as a sorta-on-topic, i'd like it if shomething like this could happen:

sequence item1, item2
item1 = "12345"
item2 = item1[3..8]

? item2
-- prints 345

Or:

if equal("3456",item1[3..6]) then
  -- do something
end if

I mean, since item1[6] doesn't exist, item1[3..6] can't be equal to "3456", so
the
equal() should fail properly. If this is against Robert's dream of Eu, how about
a
"with/without error" command? So much code i write has "." prepended and
appended
to a string, just so i can specify dimensions that don't exist in the original
string,
without using 50 tests to check bounds and lengths. How about if the booleans
don't
fail then?,,, the equal("3456",item1[3..6]) doesn't cause an error, but the
assignment
does? Yes, i know this is like the "goto" arguement, but in a way, it's dumb
that i'd
haveto write code to check bounds, then the interpreter does it too, and i don't
even
care if it's out of bounds! Yes, i know a item1[3..length(item1)] will work, but
what if i
am using this in a procedure, where [6] might be there,, or might not,, why must
i test
for it every time?

Kat

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

Search



Quick Links

User menu

Not signed in.

Misc Menu