On Thursday, 11 May 2017 at 08:42:26 UTC, Nicholas Wilson wrote:
Are you in windows perchance? IIRC the when compiling for 32
bit it doesn't use the 64 bit C file function so that will not
work.
Yes, windows. Ok, I understood you.
import std.stdio;
int main()
{
auto big = File("bigfile", "r+"); //bigfile size 20 GB
writeln(big.size); // ERROR!
return 0;
}
//
std.exception.ErrnoException@std\stdio.d(1029): Could not seek in
file `bigfile` (Invalid argument)
I can not work
2 Seb
Thank you!
is (T: typeof (null)) - very comfortable
import std.stdio;
void myFunc(T)(in T val) {
static if(is(T == string)) {
writeln("string: ", val);
}
static if(is(T : long)) {
writeln("long: ", val);
}
static if // WHAT HERE ?
writeln("null");
}
}
int main(string[] args)
tsbockman,
Many thanks! Now I work for me
import std.container.rbtree;
class myClass {
string str;
}
int main()
{
auto tree = new RedBlackTree!myClass;
return 0;
}
Error: mutable method object.Object.opCmp is not callable using a
inout object
Error: template instance std.functional.binaryFun!("a < b", "a",
"b").binaryFu
auto http = HTTP("dlang.org");
http.onReceive = (ubyte[] data)
{
writeln(cast(string) (data));
return data.length;
};
http.proxy = "192.168.111.111";
http.proxyPort = 1788;
WHAT HERE ?
http.perform();
//
how to make Сurl authorize on a pr
On Saturday, 19 July 2014 at 10:46:31 UTC, Marc Schütz wrote:
Hmm... it's unfortunate that ZipArchive doesn't take a file
descriptor. As a workaround, you can use memory mapping:
auto mmfile = new MmFile("c:/test.zip");
Thank you. it works!
I process archive:
///
import std.stdio, std.zip, std.file;
int main()
{
auto zip = new ZipArchive(read("c:/test.zip"));
foreach (item; zip.directory) {
writeln("processing ", item.name, " ...");
// processing item...
}
return 0;
}
/
it works well for n
On Friday, 6 June 2014 at 12:08:40 UTC, Rikki Cattermole wrote:
In none of your examples you have not defined the type of the
variables. However you are giving it an access modifier.
I assume you are wanting auto.
no.
keyword "const auto" before the variable name - equivalently
"const".
const r1 = regex("bla");
matchFirst( "big string", r1 ); // ERROR!
immutable r2 = regex("bla"); // ERROR!
Why can I not use const/immutable regex?
11 matches
Mail list logo