Strange behaviour with mmfile

bioinfornatics bioinfornatics at fedoraproject.org
Tue Jan 29 00:33:41 PST 2013


On Tuesday, 29 January 2013 at 06:37:11 UTC, H. S. Teoh wrote:
> On Tue, Jan 29, 2013 at 05:46:49AM +0100, nazriel wrote:
>> On Tuesday, 29 January 2013 at 00:49:07 UTC, bioinfornatics 
>> wrote:
>> >I missed to show the code
>> >
>> >$ cat test_mmap.d
>> >import std.stdio;
>> >import std.mmfile;
>> >
>> >void main(string[] args ){
>> >    MmFile m = new MmFile( args[0] );
>> >    foreach( ulong c; 0..m.length )
>> >        writeln( m[c], " ", cast(dchar) m[c] );
>> >}
>> 
>>  MmFile m = new MmFile( args[0] ); ?
>> Didn't you mean args[1] or something?
> [...]
>
> Good catch! I looked at the OP's code and didn't notice that. :)
>
> In D, args[0] is the name of the program, and args[1] is the 
> first
> argument, etc..
>
>
> T

Oh yes stupid error thanks
LOL


More information about the Digitalmars-d-learn mailing list