I need to rotate an array by 90 degrees, or have writefln figure
that out.
I need, say:
0 4 5 6
0 0 0 0
0 0 0 0
0 0 0 0
But it's outputting:
0 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
int [4][4] data;
file.writeln(format("%(%-(%d %)\n%)", data));
On 18/04/2018 6:28 PM, kookman wrote:
The below static assert fails. Is this expected? Not the way I read the
docs.
static assert (isOutputRange(typeof(stdout.lockingTextWriter), char));
static assert (isOutputRange!(typeof(stdout.lockingTextWriter()), char));
Typo corrected:
static assert (isOutputRange!(typeof(stdout.lockingTextWriter),
char));
The below static assert fails. Is this expected? Not the way I
read the docs.
static assert (isOutputRange(typeof(stdout.lockingTextWriter),
char));
On Wednesday, 18 April 2018 at 01:12:33 UTC, Chris Katko wrote:
My only questions are:
[snip]
How's about this one:
import std.stdio : writefln;
struct data_to_access_t
{
int tacos;
}
class Abc(T, alias Fn) {
T data;
this(T data) {
this.data = data;
}
void execu
On Wednesday, 18 April 2018 at 01:58:40 UTC, arturg wrote:
is it this what you want?
class A
{
int a;
void delegate() onDraw;
this(void delegate() dg)
{
onDraw = dg;
}
void drawText(string s)
{
s.writeln;
}
On Wednesday, 18 April 2018 at 01:12:33 UTC, Chris Katko wrote:
That was all pseudo-code typed by hand.
I got my code to work today. I don't know if it's the prettiest
it can be, but it works:
// TESTING ACCESS TO the OWNING function
//---
class test_wi
That was all pseudo-code typed by hand.
I got my code to work today. I don't know if it's the prettiest
it can be, but it works:
// TESTING ACCESS TO the OWNING function
//---
class test_window
{
float x;
float y;
give structs like this:
struct A
{
int a = 10;
string s = "haha";
}
struct B
{
A aDetails;
}
I'd like to do this and store that symbol name as string (my goal
is store the member name);
string memberName = magic(B.aDetails.s);
writeln(memberName); // otuput "aDetails.
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote:
You should also be able to use -link-internally /LLMV's lld if
you don't want to install MSVC
Nope, the MSVC libs are still required, and no, the ancient ones
shipping with DMD can't be used.
Hi!
Is there any way to get the full set of templates that are "overloaded"
(in my case, based on constraints)?
Basically, I'd like to make something like
https://run.dlang.io/is/z2LeAj return both versions of the template (and
then retrieve their UDAs)...
If it's not possible, I can still
On Tuesday, 17 April 2018 at 12:42:48 UTC, Dgame wrote:
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson
wrote:
On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote:
Ah, I found the msvcEnv.bat and I told me that I have to VSC
installation. Solved!
You should also be able to use -
On Tuesday, 17 April 2018 at 11:38:17 UTC, Jonathan M Davis wrote:
On Sunday, April 15, 2018 17:59:01 Dgame via
Digitalmars-d-learn wrote:
How am I supposed to insert a struct with immutable members
into an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string]
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote:
On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote:
Ah, I found the msvcEnv.bat and I told me that I have to VSC
installation. Solved!
You should also be able to use -link-internally /LLMV's lld if
you don't want to install
On Tuesday, 17 April 2018 at 11:07:55 UTC, bauss wrote:
Even though it works in static this, then it still looks like a
bug if you ask me, because the associative array itself isn't
immutable.
Yeah... I'm not sure, if this behavior is wanted, too...
If you argue, that an absent field in in
On Sunday, April 15, 2018 17:59:01 Dgame via Digitalmars-d-learn wrote:
> How am I supposed to insert a struct with immutable members into
> an assoc. array?
>
> Reduced example:
>
> struct A {
> immutable string name;
> }
>
> A[string] as;
> as["a"] = A("a"); // Does not work
>
I w
On Tuesday, 17 April 2018 at 03:55:55 UTC, Chris Katko wrote:
What I want:
class viewport_t
{
int x,y,w,h;
}
class dialog_t
{
int x,y;
this( int x, int y, delegate void (viewport_t) on_draw )
{
this.x = x;
this.y = y;
this.execute = execute;
}
void draw_text(
On Sunday, 15 April 2018 at 18:51:52 UTC, Alex wrote:
On Sunday, 15 April 2018 at 17:59:01 UTC, Dgame wrote:
How am I supposed to insert a struct with immutable members
into an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string] as;
as["a"] = A("a"); // Does
On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote:
Ah, I found the msvcEnv.bat and I told me that I have to VSC
installation. Solved!
You should also be able to use -link-internally /LLMV's lld if
you don't want to install MSVC
On Tuesday, 17 April 2018 at 03:55:55 UTC, Chris Katko wrote:
What I want:
class viewport_t
{
int x,y,w,h;
}
class dialog_t
{
int x,y;
this( int x, int y, delegate void (viewport_t) on_draw )
{
this.x = x;
this.y = y;
this.execute = execute;
}
void draw_text(
On Tuesday, 17 April 2018 at 09:42:01 UTC, Dgame wrote:
I'm trying to use Ldc on Windows, but I get these linker errors:
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown
I'm trying to use Ldc on Windows, but I get these linker errors:
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : OUT
OPTLINK : Warning 9: Unknown Option : LIBPA
22 matches
Mail list logo