strange script evaluation - 11/10/08 06:56 AM
The function (not identifier, lets get this shit right, it's a function) $read evaluates one too many times. For example, I have written a function to echo the filename and contents of each script loaded. If any of your scripts use a $identifier or %identifier these will be evaluated on output rather than the name of the $identifier/%identifier. This is extremely awkward for a scripting/programming language. Get your shit together, man.
Code:
alias ScriptStuff { var %a var %b var %l var %s var %x var %y = $script(0) echo -- scripts loaded: %y %x = 1 while (%x <= %y) { %s = $script(%x) %b = $lines(%s) %a = 1 echo $+(script[,%x,]) = %s echo ---------- while (%a < %b) { echo $+(line[,%a,]) = $read(%s,%a) inc %a } echo ---------- inc %x } }