Hi. Me again, couldn't resist it, hope you don't mind :-)

--- In [EMAIL PROTECTED], Alex Peters <[EMAIL PROTECTED]> wrote:
> I have not considered this because this would involve loading each
> alias' script commands into the map, which would seemingly be a 
waste
> of memory since the alias definitions exist in the script.

But if I get it right you load all your aliases into memory now as 
well in form of a newline-delimited string (Aliases). I don't know 
for sure but I bet it's more efficient directly calling an element of 
an organized data-structure with map["aliasname"] than searching 
through a complete string with index(), then doing quite a lot of 
further string manipulation and then reading the whole script file up 
to the desired label into memory again to run the alias.

> the user were to modify the script, these changes would not be
> reflected until the user also rebuilt the map, and because more is
> being read into memory and less lines are skipped, this would be 
much
> slower.

If "modify the script" means modifying/adding/deleting an alias of 
the script this could be done by just changing the according entry in 
the map and in the (ini)file, couldn't it? No need to rebuilt the 
whole map...

> This approach would definitely be advantageous however, if aliases
> were guaranteed to be only one line in length, similar to Luciano's
> script. The Add and Remove aliases would not be able to exist if 
this
> approach were used though.

Why not? If I'm not mistaken the map could contain simple script runs 
as well like:
aliasmap["add"] = "[EMAIL PROTECTED]" or
aliasmap["remove"] = "[EMAIL PROTECTED]"
but I'd only read the script when it's necessary for more complicated 
stuff, the simple entries like:
aliasmap["prog"] = "path/to/program"
would be run directly.

> Once a variable is statically declared in a script, it will be 
defined
> for any future calls to that script, including the @Add alias.

You're absolutely right. I completely misunderstood this.

Mockey




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->

****  EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to