1. wishlist

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 message » categorize

2. wishlist

here are some things that'd be cool to put in eu...

1) an "ncurses" option for the without keyword to use basic console I/O 
without initializing ncurses. i have a program i'm writing with Irv's 
GraphApp wrapper. When someone clicks the menu and then selects Close or 
Delete or whatever, the window will close and exu will shutdown, but if 
it was launched from the console, outside of ncurses, no color will be 
seen, nothing typed will be echoed, and carriage returns don't do 
anything

2) Defining symbols. For example:

--- somefile.e
if somecondition then
  define get_a_life
end if
...

-- main.ex
include somefile.e

if defined(get_a_life) then
  puts(1,"You need a life. How many can I put you down for? ")
...

3) A rename() function:

result = rename("afile","anewfilename")

4) A set_attributes() function:

result = set_attributes("afile","744")

or

result = set_attributes("afile,"rwxr--r--")

or in DOS/Windows

result = set_attributes("afile","+a-h") -- set archive, unset hidden

or in any upcoming Macintosh port...

result = set_attributes("afile",{"APPL","????",0})

where the first item is the file type, the second is the creator, and 
the third indicates if the file is locked.

5) Maybe even the ability to use .o and .a files in Linux and .lib and 
.obj files in DOS

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

Search



Quick Links

User menu

Not signed in.

Misc Menu