[Issue 759] New: rdmd does not accept "*.d" or "name.d" as program argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 28 03:06:26 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=759

           Summary: rdmd does not accept "*.d" or "name.d" as program
                    argument
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: MaassG at web.de


but takes it misleadingly for the program itself.

------------------------------------------
demo prog
------------------------------------------
#!/usr/bin/env rdmd

import std.stdio;
import std.file;

int main(char[][] args){
  if( args.length < 2 ){
          writefln( "usage: listdir <directory> <pattern>" );
          return 1;
        }
  foreach( uint i, char[] arg; args ){
    if( i>0 ) writefln( "arg %2.2d: %s", i, arg );
  }

  char[][] dirs = void;
  if( args.length > 2 ) dirs = listdir( args[1], args[2] );
  else dirs = listdir( args[1] );

  dirs.sort;

  foreach (d; dirs) writefln( "%s", d );
  writefln( "count: %d", dirs.length );

  return 0;
}


-- 



More information about the Digitalmars-d-bugs mailing list