On 02/13/2018 06:51 AM, Domain wrote:
module main;
void main ()
{
writeln("Hello");
}
Of course, this won't compile, but error message is confused:
C:\Git\hello\source>dmd app.d
app.d(5): Error:
object.Error@(0): Access Violation
This is issue 18403. You should see an error message with
On Monday, 12 February 2018 at 02:05:16 UTC, aliak wrote:
struct B(T) {
T t;
}
struct A(T) {
T t;
auto opCast(U)() {
return B!U(cast(U)t);
}
}
void main() {
auto a = A!int(3);
auto b = cast(float)a; // error
}
Having the result of "cast(float) a" not be a float
On Sunday, 11 February 2018 at 15:05:26 UTC, number wrote:
On Sunday, 11 February 2018 at 13:17:13 UTC, number wrote:
unable to fork: Cannot allocate memory
if i comment-out the line..
writeln(GdkKeysyms.GDK_Escape);
then it compiles/links/runs fine.
I just tried again.
compiling the follo
On Tuesday, 13 February 2018 at 12:17:31 UTC, number wrote:
On Sunday, 11 February 2018 at 15:05:26 UTC, number wrote:
On Sunday, 11 February 2018 at 13:17:13 UTC, number wrote:
unable to fork: Cannot allocate memory
if i comment-out the line..
writeln(GdkKeysyms.GDK_Escape);
then it compiles
So, strange problem below.
The commented-out line will not compile (if I un-comment it),
unless I either move std.stdio into main, or, move std.file out
of main.
Whereas writeln works just fine as is.
-
module test;
import std.stdio;
void main()
{
import std.file;
On Tuesday, 13 February 2018 at 13:46:11 UTC, psychoticRabbit
wrote:
So, strange problem below.
The commented-out line will not compile (if I un-comment it),
unless I either move std.stdio into main, or, move std.file out
of main.
Whereas writeln works just fine as is.
-
On 13/02/2018 1:46 PM, psychoticRabbit wrote:
So, strange problem below.
The commented-out line will not compile (if I un-comment it), unless I
either move std.stdio into main, or, move std.file out of main.
Whereas writeln works just fine as is.
-
module test;
import st
psychoticRabbit wrote:
So, strange problem below.
The commented-out line will not compile (if I un-comment it), unless I
either move std.stdio into main, or, move std.file out of main.
Whereas writeln works just fine as is.
-
module test;
import std.stdio;
void main()
On Tuesday, 13 February 2018 at 13:52:37 UTC, rikki cattermole
wrote:
On 13/02/2018 1:46 PM, psychoticRabbit wrote:
So, strange problem below.
The commented-out line will not compile (if I un-comment it),
unless I either move std.stdio into main, or, move std.file
out of main.
Whereas write
On Tuesday, 13 February 2018 at 12:32:58 UTC, Stefan Koch wrote:
On Tuesday, 13 February 2018 at 12:17:31 UTC, number wrote:
I just tried again.
compiling the following code eats up my 4GB of RAM and fails.
Please copy the enumeration
from:
https://github.com/gtkd-developers/GtkD/blob/master
On Tuesday, 13 February 2018 at 13:57:38 UTC, ketmar wrote:
`std.file` has function named `write()` too. and local import
completely shadows global imports (i.e. it removes global
imports from overload set for the given scope), hence
`std.stdio.write()` is not available there.
"..local import
psychoticRabbit wrote:
Also, if I do this below, how does the compiler choose the correct write
function?
import std.stdio;
import std.file;
void main()
{
write("hello");
writeln("hello again");
}
it's easy: just take a look at `std.file.write()`. first, it require two
arguments.
On Tuesday, 13 February 2018 at 14:18:05 UTC, ketmar wrote:
psychoticRabbit wrote:
Also, if I do this below, how does the compiler choose the
correct write function?
import std.stdio;
import std.file;
void main()
{
write("hello");
writeln("hello again");
}
it's easy: just take a
On Tuesday, 13 February 2018 at 13:56:17 UTC, psychoticRabbit
wrote:
On Tuesday, 13 February 2018 at 13:52:37 UTC, rikki cattermole
wrote:
On 13/02/2018 1:46 PM, psychoticRabbit wrote:
So, strange problem below.
The commented-out line will not compile (if I un-comment it),
unless I either mov
On Tuesday, 13 February 2018 at 14:21:31 UTC, bauss wrote:
What you can do is use aliases to use both functions.
import io = std.stdio;
void main()
{
import file = std.file;
file.write("hello");
io.writeln("hello again");
}
that's a nice simple solution.
thanks.
On 2/12/18 12:33 AM, Norm wrote:
Hi,
I'm new to D so can someone explain to me what is happening here?
void func(const char* s, char** e) {
import core.stdc.stdlib;
auto result = strtod(s, e);
}
Error: function core.stdc.stdlib.strtod (scope inout(char)* nptr, scope
inout(char)** e
On Tuesday, 13 February 2018 at 13:52:37 UTC, rikki cattermole
wrote:
write exists in both, writeln exists only in std.stdio.
Use named imports to pick which write you want.
It does seem a little silly to have a name clash with such a
commonly used function. Would it not be better to rename
On Tuesday, 13 February 2018 at 16:55:10 UTC, ixid wrote:
On Tuesday, 13 February 2018 at 13:52:37 UTC, rikki cattermole
wrote:
write exists in both, writeln exists only in std.stdio.
Use named imports to pick which write you want.
It does seem a little silly to have a name clash with such a
On Monday, 12 February 2018 at 06:52:25 UTC, Vino wrote:
Hi All,
Request your help, the below code works find on normal File
system, bu if the file system is a NFS file system the below
code, is not working
if Step = dryrun( Display Only) : Works for both NFS and normal
file system.
if S
On Tuesday, 13 February 2018 at 16:58:09 UTC, Vino wrote:
On Monday, 12 February 2018 at 06:52:25 UTC, Vino wrote:
[...]
Hi All,
Was able to resolve this issue.
That's great!
BTW I think it would be helpful for future reader who find this
thread to know how you resolved your problem.
import vibe.vibe;
import vibe.db.postgresql;
QueryParams p;
p.sqlCommand = "select
title,url,url_title,messagebody,generationtime from items order
by generationtime;";
auto _items = conn.execParams(p);
struct Range
{
immutable Answer a;
size_t i;
immutable(Row) front() { retu
On Tuesday, 13 February 2018 at 17:08:24 UTC, Nicholas Wilson
wrote:
Is this a problem with the library or me? Can I work around it?
How?
Thanks
Nic
So digging around in the library code, commenting it out seems to
work for now as I don't use UUIDs. Error didn't originate from my
code becau
On Tuesday, 13 February 2018 at 17:17:41 UTC, Nicholas Wilson
wrote:
On Tuesday, 13 February 2018 at 17:08:24 UTC, Nicholas Wilson
wrote:
Is this a problem with the library or me? Can I work around
it? How?
Thanks
Nic
So digging around in the library code, commenting it out seems
to work fo
On Tuesday, 13 February 2018 at 12:12:30 UTC, Nathan S. wrote:
On Monday, 12 February 2018 at 02:05:16 UTC, aliak wrote:
struct B(T) {
T t;
}
struct A(T) {
T t;
auto opCast(U)() {
return B!U(cast(U)t);
}
}
void main() {
auto a = A!int(3);
auto b = cast(float)a;
El 13/02/18 a les 08:03, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
>> El 12/02/18 a les 21:56, Martin Tschierschke via Digitalmars-d-learn ha
>> escrit:
>>> I just started to play around with D again on my notebook at h
On Tuesday, 13 February 2018 at 14:10:44 UTC, number wrote:
Ok, thanks for the info. I guess I'll just use printf then for
larger enums.
To get the same convince you can use.
the enumToString from:
https://forum.dlang.org/post/pnggoabnnkojdonyz...@forum.dlang.org
and writeln the result oft th
On Tuesday, 13 February 2018 at 21:25:44 UTC, Jordi Sayol wrote:
El 13/02/18 a les 08:03, Martin Tschierschke via
Digitalmars-d-learn ha escrit:
On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
El 12/02/18 a les 21:56, Martin Tschierschke via
Digitalmars-d-learn ha escrit:
I just
On Tuesday, 13 February 2018 at 17:01:06 UTC, Seb wrote:
On Tuesday, 13 February 2018 at 16:58:09 UTC, Vino wrote:
On Monday, 12 February 2018 at 06:52:25 UTC, Vino wrote:
[...]
Hi All,
Was able to resolve this issue.
That's great!
BTW I think it would be helpful for future reader who fin
28 matches
Mail list logo