https://forum.dlang.org/post/kawfhminmtmwbmkzh...@forum.dlang.org
On Monday, 19 June 2023 at 06:11:59 UTC, mw wrote:
LDC - the LLVM D compiler (1.32.2):
```
main.d(32): Error: undefined identifier `vector` in module
`core.stdcpp.vector`, did you mean enum member `MIctor`?
```
So what's wrong
On Thursday, 25 January 2024 at 20:11:05 UTC, Stephen Tashiro
wrote:
void main()
{
ulong [3][2] static_array = [ [0,1,2],[3,4,5] ];
static_array[2][1] = 6;
}
The static array has length 2, so index 2 is out of bounds, must
be 0 or 1.
On Thursday, 25 January 2024 at 20:11:05 UTC, Stephen Tashiro
wrote:
Can the elements of an array be accessed with a pointer using
the usual indexing notation (e.g."[2][0]") for array elements?
- or must we treat the elements associated with the pointer as
1-dimensional list and use pointer
Can the elements of an array be accessed with a pointer using the
usual indexing notation (e.g."[2][0]") for array elements? - or
must we treat the elements associated with the pointer as
1-dimensional list and use pointer arithmetic?
A more elementary question is why array index 2 is
On Thursday, 25 January 2024 at 17:50:57 UTC, Johan wrote:
On Thursday, 25 January 2024 at 16:07:44 UTC, Stefan Koch wrote:
On Thursday, 25 January 2024 at 15:39:08 UTC, ryuukk_ wrote:
```D
void main()
{
char[32] id = 0;
id = "hello";
}
```
this works fine, and that is what i expect
On Thursday, 25 January 2024 at 12:19:47 UTC, Paul Backus wrote:
On Thursday, 25 January 2024 at 08:25:02 UTC, atzensepp wrote:
```d
int function(int) t = compose!(f,g,g,f,g,g,f,g,g,f);
```
This leads to:
```
gdc lambda4.d
lambda4.d:28:25: error: template compose(E)(E a) has no value
int
On Thursday, 25 January 2024 at 16:07:44 UTC, Stefan Koch wrote:
On Thursday, 25 January 2024 at 15:39:08 UTC, ryuukk_ wrote:
```D
void main()
{
char[32] id = 0;
id = "hello";
}
```
this works fine, and that is what i expect for the example
above..
Raise a bug, I'll fix it.
Hmm.
On Thursday, 25 January 2024 at 16:07:44 UTC, Stefan Koch wrote:
On Thursday, 25 January 2024 at 15:39:08 UTC, ryuukk_ wrote:
```D
void main()
{
char[32] id = 0;
id = "hello";
}
```
this works fine, and that is what i expect for the example
above..
Raise a bug, I'll fix it.
buna
On Thursday, 25 January 2024 at 15:39:08 UTC, ryuukk_ wrote:
```D
void main()
{
char[32] id = 0;
id = "hello";
}
```
this works fine, and that is what i expect for the example
above..
Raise a bug, I'll fix it.
```D
void main()
{
char[32] id = 0;
id = "hello";
}
```
this works fine, and that is what i expect for the example above..
On Thursday, 25 January 2024 at 15:22:35 UTC, Hipreme wrote:
On Thursday, 25 January 2024 at 15:20:01 UTC, ryuukk_ wrote:
```D
void main()
{
char[32] id = 0;
const(char)* str = "hello";
id = str[0 .. 6];
}
```
it should be a simple memcpy, why DMD complain?
``onlineapp.d(6):
On Thursday, 25 January 2024 at 15:20:01 UTC, ryuukk_ wrote:
```D
void main()
{
char[32] id = 0;
const(char)* str = "hello";
id = str[0 .. 6];
}
```
it should be a simple memcpy, why DMD complain?
``onlineapp.d(6): Error: mismatched array lengths 32 and 6 for
assignment `id[] =
```D
void main()
{
char[32] id = 0;
const(char)* str = "hello";
id = str[0 .. 6];
}
```
it should be a simple memcpy, why DMD complain?
``onlineapp.d(6): Error: mismatched array lengths 32 and 6 for
assignment `id[] = str[0..6]```
I'm too tired to notice something obvious?
On Thursday, 25 January 2024 at 08:25:02 UTC, atzensepp wrote:
```d
int function(int) t = compose!(f,g,g,f,g,g,f,g,g,f);
```
This leads to:
```
gdc lambda4.d
lambda4.d:28:25: error: template compose(E)(E a) has no value
int function(int) t = compose!(f,g,g,f,g,g,f,g,g,f);
```
Try using
On Thursday, January 25, 2024 1:57:56 AM MST Jim Balter via Digitalmars-d-
learn wrote:
> The specification of ranges, which is independent of
> the D language, says that the way to copy a range is to use
> save().
I'm sorry, but you're misunderstanding the range specification if you think
that
Looks like the context is currently passed for nested functions,
not for nested classes.
On Thursday, 25 January 2024 at 08:46:34 UTC, Renato wrote:
```d
void main() {
Person p = { "Joe", "j...@ab.com", 30};
writeln(p);
}
```
I just tested it and it works. It's `great`!
On Friday, 19 January 2024 at 18:13:55 UTC, Jonathan M Davis
wrote:
On Friday, January 19, 2024 3:49:29 AM MST Jim Balter via
Digitalmars-d-learn wrote:
On Friday, 17 November 2017 at 17:55:30 UTC, Jonathan M Davis
wrote:
> When you have
>
> foreach(e; range)
>
> it gets lowered to something
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
```d
struct Person {
string name, email;
ulong age;
}
Person a{"n","email",33};
```
C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the
On Wednesday, 24 January 2024 at 21:34:26 UTC, user1234 wrote:
On Wednesday, 24 January 2024 at 21:30:23 UTC, user1234 wrote:
On Wednesday, 24 January 2024 at 21:12:20 UTC, atzensepp wrote:
[...]
what a bummer!
Have you tried
https://dlang.org/phobos/std_functional.html#compose ?
Well
20 matches
Mail list logo