digitalmars.D - dscript (not DMDscript)
- Russ Lewis <spamhole-2001-07-16 deming-os.org> Mar 02 2005
Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I have written a simple bash script which allows me to write D programs as scripts. Basically, it just greps through the script, finding 'import' statments and 'extern' declarations. Then it echos out the start of a main() function, dumps the rest of the script, and then closes the main function. It compiles the file and runs it. Obviously, it's a little slow, but it isn't too bad for a first pass. :) BTW, I included 'dscript_in_dscript', which is my proof that the language is workable. This is a script which does the same as dscript, but it is written in dscript instead of bash. You'll see that there are some things which are easy to do in dscript, and other things which are better done in bash.
Mar 02 2005