|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
DMDScript - System Object
Last night I created a static (it acts like Math) System object and bound it to
DMDScript. I threw the following functions into it:
System.exit
version(console){
System.printLine
System.print
System.readLine
System.read
System.environment
System.command
}
I versioned off most of it so that people have the option to disable the
features. They are too powerful for some browser/embedded uses after all. :p
I also figured out exactly what DMDScript's testscript.d was doing. I moved
that to console.d and thought about what to do with the arguments. Currently,
it's designed to handle batch processesing with includes. That may be very
useful for some people, and it's exactly how wscript/cscript manage their
command line arguments. Since DMDScript is very close to being a stand-in for
JScript I thought it best not to ruin that.
Instead, I named yet another version() feature into the console - one that makes
it only process one script, and passes all the remaining arguments to the Global
arguments[].
I had to remove some of my old string manipulating assembler because I found an
obscure bug that I didn't feel like trying to understand. I also streamlined
the sieve.ds to run about 15% faster. :)
I'll post up changes tonight once I've tested it (I'm gonna bombard it with
about 40 of my scripts and see how it cries - I use every feature in the
language *and some* somewhere in those scripts).
I'll look over the posts lately and see if there was anything I missed (apart
from the Proxy bug)
Nov 11 2005
"Dan" <Dan_member pathlink.com> wrote in message news:dl41ei$23ba$1 digitaldaemon.com... Feb 04 2006
|