On Friday, 4 September 2020 at 17:36:00 UTC, Jacob Carlborg wrote:
It's useful for serialization and, as you can see in your
example, for debugging as well. `writeln` will print the values
of the fields in a struct, even for private fields.
I wouldn't dispute that it is useful, but that's
On Thursday, 3 September 2020 at 14:34:48 UTC, Jacob Carlborg
wrote:
Oh, multiple binaries, I missed that. You can try to add
multiple configurations [1]. Or if you have executables
depending on only one source file, you can use single-file
packages [2].
Thanks, but this still means I would
On Thursday, 3 September 2020 at 08:22:25 UTC, glis-glis wrote:
Hi,
I have a few modules for parsing different file formats and a
folder with d-scripts using these parsers to perform
manipulations, extract information, ...
Until now, I just added
#!/usr/bin/env rdmd
to the d-scripts and
On 9/4/20 10:27 AM, glis-glis wrote:
On Thursday, 3 September 2020 at 14:34:48 UTC, Jacob Carlborg wrote:
Oh, multiple binaries, I missed that. You can try to add multiple
configurations [1]. Or if you have executables depending on only one
source file, you can use single-file packages [2].
On Friday, 4 September 2020 at 07:27:33 UTC, glis-glis wrote:
On Thursday, 3 September 2020 at 14:34:48 UTC, Jacob Carlborg
wrote:
Oh, multiple binaries, I missed that. You can try to add
multiple configurations [1]. Or if you have executables
depending on only one source file, you can use
On Friday, 4 September 2020 at 10:16:47 UTC, 60rntogo wrote:
Consider the following code.
foo.d
---
module foo;
struct Foo
{
private int i;
}
---
main.d
---
void main()
{
import std.stdio;
import foo;
auto x = Foo();
writeln(x);
// ++x.i;
++x.tupleof[0];
writeln(x);
}
---
As
Consider the following code.
foo.d
---
module foo;
struct Foo
{
private int i;
}
---
main.d
---
void main()
{
import std.stdio;
import foo;
auto x = Foo();
writeln(x);
// ++x.i;
++x.tupleof[0];
writeln(x);
}
---
As expected, the commented line does not compile. If I uncomment
Nice, I have been having this problem for quite a while too.
Thanks
On Thursday, 3 September 2020 at 12:36:35 UTC, Thomas wrote:
-
import std.stdio;
int main()
{
import gfm.math.matrix;
const int width = 800;
const int height = 600;
auto projectionMatrix = mat4!(float).identity();
Note that instead of `mat4!(float)` you
On 9/4/20 1:48 AM, Jesse Phillips wrote:
On Thursday, 3 September 2020 at 15:12:14 UTC, Steven Schveighoffer wrote:
int[int] aa;
aa[4] = 5;
auto b = aa[4];
How is this code broken? It's valid, will never throw, and there's no
reason that we should break it by adding an exception into the mix.
On Tuesday, 1 September 2020 at 18:20:17 UTC, Jesse Phillips
wrote:
This is going to be a hard one for me to argue but I'm going to
give it a try.
Today if you attempt to access a key from an associative array
(AA) that does not exist inside the array, a RangeError is
thrown. This is similar
On Fri, Sep 04, 2020 at 07:36:00PM +0200, Jacob Carlborg via
Digitalmars-d-learn wrote:
[...]
> It's useful for serialization and, as you can see in your example, for
> debugging as well. `writeln` will print the values of the fields in a
> struct, even for private fields.
It's certainly useful,
On Friday, 4 September 2020 at 18:23:09 UTC, H. S. Teoh wrote:
On Fri, Sep 04, 2020 at 07:36:00PM +0200, Jacob Carlborg via
Digitalmars-d-learn wrote: [...]
It's useful for serialization and, as you can see in your
example, for debugging as well. `writeln` will print the
values of the fields
On 2020-09-04 12:16, 60rntogo wrote:
Consider the following code.
foo.d
---
module foo;
struct Foo
{
private int i;
}
---
main.d
---
void main()
{
import std.stdio;
import foo;
auto x = Foo();
writeln(x);
// ++x.i;
++x.tupleof[0];
writeln(x);
}
---
As expected, the
14 matches
Mail list logo