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 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?