On Sunday, 19 September 2021 at 03:58:41 UTC, Kirill wrote:
How can I get the base type of any
(multidimensional/static/dynamic/associative) array?
Example:
```
void main() {
int[][] intArr;
double[4][] doubleArr;
string[string][] strArr;
intArr.example; // T = int
doubleAr
How can I get the base type of any
(multidimensional/static/dynamic/associative) array?
Example:
```
void main() {
int[][] intArr;
double[4][] doubleArr;
string[string][] strArr;
intArr.example; // T = int
doubleArr.example; // T = double
strArr.example; // T = string
}
On 9/18/21 5:16 PM, frame wrote:
On Saturday, 18 September 2021 at 18:48:07 UTC, Steven Schveighoffer wrote:
Did you mean "long to char" cast? In that case, yes, you have to cast it.
Note, `out` is a keyword, it can't be used as a variable, but you
probably already figured that out. But if `ou
On 9/18/21 5:20 PM, frame wrote:
On Saturday, 18 September 2021 at 21:16:13 UTC, frame wrote:
On Saturday, 18 September 2021 at 18:48:07 UTC, Steven Schveighoffer
wrote:
Are you defining the prototype for strchr yourself instead of
importing it from core.stdc.string?
Not really :D but without
On Saturday, 18 September 2021 at 15:38:38 UTC, rempas wrote:
I'm seeing in the page about "BeterC" and in the part about the
[retained
features](https://dlang.org/spec/betterc.html#retained), the
#11 says about "COM classes and C++ classes". What are the "C++
classes"? I tried to create a cla
On Saturday, 18 September 2021 at 21:16:13 UTC, frame wrote:
On Saturday, 18 September 2021 at 18:48:07 UTC, Steven
Schveighoffer wrote:
Are you defining the prototype for strchr yourself instead of
importing it from core.stdc.string?
Not really :D but without cast it complains:
```
Error: can
El 18/9/21 a les 22:40, Chris_D via Digitalmars-d-learn ha escrit:
The "D Programming Language Specification" seems to be the most important
documentation for D. Is it really only available as Mobi? That is the most bizarre
choice of format I've ever seen.
Chris
https://d-apt.sourcefo
On Saturday, 18 September 2021 at 18:48:07 UTC, Steven
Schveighoffer wrote:
Are you defining the prototype for strchr yourself instead of
importing it from core.stdc.string?
Not really :D but without cast it complains:
```
Error: cannot implicitly convert expression strchr(e, cast(int)c)
of ty
On Saturday, 18 September 2021 at 20:40:56 UTC, Chris_D wrote:
The "D Programming Language Specification" seems to be the most
important documentation for D. Is it really only available as
Mobi? That is the most bizarre choice of format I've ever seen.
Chris
No, it's not *only* available
The "D Programming Language Specification" seems to be the most
important documentation for D. Is it really only available as
Mobi? That is the most bizarre choice of format I've ever seen.
Chris
On 9/18/21 12:52 PM, frame wrote:
There were also parts where the pointer is used in calculations - which
is accepted by the compiler - it just complains about implicitly `long`
to `char*` cast:
```
// const char *e
// char *w
out[p++] = ((w - e) + 3) % 40;
```
Did you mean "long to char" cas
On 9/18/21 12:52 PM, frame wrote:
On Saturday, 18 September 2021 at 11:47:52 UTC, Steven Schveighoffer wrote:
Have you tried:
```d
const(char)* s2 = "...";
```
This will work because string literals are zero terminated and
implicitly castable to `immutable(char)*`, which will also implicitly
On Saturday, 18 September 2021 at 11:47:52 UTC, Steven
Schveighoffer wrote:
Have you tried:
```d
const(char)* s2 = "...";
```
This will work because string literals are zero terminated and
implicitly castable to `immutable(char)*`, which will also
implicitly cast to `const(char)*`.
That s
I'm seeing in the page about "BeterC" and in the part about the
[retained
features](https://dlang.org/spec/betterc.html#retained), the #11
says about "COM classes and C++ classes". What are the "C++
classes"? I tried to create a class using "extern(C++)" but this
didn't worked. Can someone mak
Double check in your dub.json file and see if you haven't changed
your buildoptions
DEBUG:
it's caught: https://run.dlang.io/is/F8HkD8
RELEASE:
segfault as expected: https://run.dlang.io/is/oLU2M3
And make sure to use latest version of ldc
On 9/18/21 1:27 AM, evilrat wrote:
> IIRC they went out of business for inability to compete
Yes, but not Sociomantic but Dunhumby[1], who had acquired Sociomantic,
shut down that business because of changes in the ad market.
Ali
On 9/18/21 7:49 AM, Steven Schveighoffer wrote:
add buys
"ad buys" of course :P
-Steve
On 9/18/21 5:40 AM, frame wrote:
On Friday, 17 September 2021 at 14:29:23 UTC, Steven Schveighoffer wrote:
Looking at that signature, it does not appear that it uses
zero-termination at all, as it takes a length. So using `dup` and
therefore the gc is totally unnecessary.
I'm assuming that s
On 9/18/21 4:02 AM, Dylan Graham wrote:
On Friday, 17 September 2021 at 14:37:29 UTC, Meta wrote:
On Friday, 17 September 2021 at 10:31:34 UTC, bauss wrote:
On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
[...]
It's just another "useless" attribute that the language has added
b
On Saturday, 18 September 2021 at 09:39:24 UTC, eugene wrote:
The definition of this struct was taken from
/usr/include/dmd/druntime/import/core/sys/linux/epoll.d
...
If the reason for crash was in EpollEvent alignment,
programs would segfaults always very soon after start,
just right after the
On Friday, 17 September 2021 at 14:29:23 UTC, Steven
Schveighoffer wrote:
Looking at that signature, it does not appear that it uses
zero-termination at all, as it takes a length. So using `dup`
and therefore the gc is totally unnecessary.
I'm assuming that string is the barcode argument?
On Tuesday, 14 September 2021 at 20:59:14 UTC, Ali Çehreli wrote:
On 9/14/21 9:56 AM, eugene wrote:
> On Tuesday, 14 September 2021 at 16:43:50 UTC, jfondren wrote:
>> The misaligned pointer and the
>> reference-containing struct that vanishes on the return of
your
>> corresponding function are
On Saturday, 18 September 2021 at 08:02:13 UTC, Dylan Graham
wrote:
On Friday, 17 September 2021 at 14:37:29 UTC, Meta wrote:
On Friday, 17 September 2021 at 10:31:34 UTC, bauss wrote:
On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
[...]
It's just another "useless" attribute th
On Friday, 17 September 2021 at 14:37:29 UTC, Meta wrote:
On Friday, 17 September 2021 at 10:31:34 UTC, bauss wrote:
On Thursday, 16 September 2021 at 20:53:34 UTC, Elmar wrote:
[...]
It's just another "useless" attribute that the language has
added before fixing any of the real problems :)
24 matches
Mail list logo