Re: std.stdio.File.seek error

2016-03-14 Thread Mike Parker via Digitalmars-d-learn
On Monday, 14 March 2016 at 14:19:27 UTC, stunaep wrote: I'm on my phone but I think It said something like Deprecation: module std.stdio not accessible from here. Try import static std.stdio Deprecation: module std.stdio is not accessible here, perhaps add 'static import std.stdio;' The

Re: std.stdio.File.seek error

2016-03-14 Thread Kagamin via Digitalmars-d-learn
On Monday, 14 March 2016 at 14:19:27 UTC, stunaep wrote: I'm on my phone but I think It said something like Deprecation: module std.stdio not accessible from here. Try import static std.stdio That's fix for bug https://issues.dlang.org/show_bug.cgi?id=313 See the code where std.stdio is not

Re: std.stdio.File.seek error

2016-03-14 Thread stunaep via Digitalmars-d-learn
On Monday, 14 March 2016 at 13:33:36 UTC, Mike Parker wrote: On Monday, 14 March 2016 at 09:57:19 UTC, stunaep wrote: It looks like _fseeki64 is in the nightly build but not dmd 2.070.2; However, the nightly build says std.stdio and std.conv are deprecated and I cant use them. I think you

Re: std.stdio.File.seek error

2016-03-14 Thread Mike Parker via Digitalmars-d-learn
On Monday, 14 March 2016 at 09:57:19 UTC, stunaep wrote: It looks like _fseeki64 is in the nightly build but not dmd 2.070.2; However, the nightly build says std.stdio and std.conv are deprecated and I cant use them. I think you may be misinterpreting the error message. There was a change

Re: std.stdio.File.seek error

2016-03-14 Thread stunaep via Digitalmars-d-learn
On Monday, 14 March 2016 at 07:15:01 UTC, Nicholas Wilson wrote: On Monday, 14 March 2016 at 05:24:48 UTC, stunaep wrote: On Monday, 14 March 2016 at 03:07:05 UTC, Nicholas Wilson wrote: [...] I'm currently on windows 7. The code you gave me prints 022. It's weird because it always tries to

Re: std.stdio.File.seek error

2016-03-14 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 14 March 2016 at 05:24:48 UTC, stunaep wrote: On Monday, 14 March 2016 at 03:07:05 UTC, Nicholas Wilson wrote: [...] I'm currently on windows 7. The code you gave me prints 022. It's weird because it always tries to convert longs to ints and I think that is weird because the

Re: std.stdio.File.seek error

2016-03-14 Thread stunaep via Digitalmars-d-learn
Just tested it on arch linux 64 bit and it works with no problem seeking to positions over 2^31-1

Re: std.stdio.File.seek error

2016-03-13 Thread stunaep via Digitalmars-d-learn
It seems my lacking knowledge of C has gotten the best of me and longs in C only have a signed int range? It looks like in C, fseeko() is needed on linux and _fseeki64() is needed on windows, but I dont see either of these in stdc.stdio.

Re: std.stdio.File.seek error

2016-03-13 Thread stunaep via Digitalmars-d-learn
On Monday, 14 March 2016 at 03:07:05 UTC, Nicholas Wilson wrote: On Monday, 14 March 2016 at 00:12:46 UTC, stunaep wrote: On Sunday, 13 March 2016 at 12:21:11 UTC, Nicholas Wilson wrote: [...] I'm on 64 bit but it needs to work on both. It works for anything between 0 and 2147483647.

Re: std.stdio.File.seek error

2016-03-13 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 14 March 2016 at 00:12:46 UTC, stunaep wrote: On Sunday, 13 March 2016 at 12:21:11 UTC, Nicholas Wilson wrote: On Sunday, 13 March 2016 at 10:32:41 UTC, stunaep wrote: I have a very large file I need to read data from at certain positions, but I have run into this error [...] when

Re: std.stdio.File.seek error

2016-03-13 Thread stunaep via Digitalmars-d-learn
On Sunday, 13 March 2016 at 12:21:11 UTC, Nicholas Wilson wrote: On Sunday, 13 March 2016 at 10:32:41 UTC, stunaep wrote: I have a very large file I need to read data from at certain positions, but I have run into this error std.conv.ConvOverflowException@std\conv.d(1328): Conversion positive

Re: std.stdio.File.seek error

2016-03-13 Thread Nicholas Wilson via Digitalmars-d-learn
f.seek(173445340 , SEEK_SET); f.seek(173445340 , SEEK_REL); oops that should be 3173445340.

Re: std.stdio.File.seek error

2016-03-13 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 13 March 2016 at 10:32:41 UTC, stunaep wrote: I have a very large file I need to read data from at certain positions, but I have run into this error std.conv.ConvOverflowException@std\conv.d(1328): Conversion positive overflow when seeking to 6346890680. Seeking to smaller values

std.stdio.File.seek error

2016-03-13 Thread stunaep via Digitalmars-d-learn
I have a very large file I need to read data from at certain positions, but I have run into this error std.conv.ConvOverflowException@std\conv.d(1328): Conversion positive overflow when seeking to 6346890680. Seeking to smaller values such as 3580720 work with no problem. The file is well over