On Friday, 13 January 2023 at 05:17:59 UTC, thebluepandabear
wrote:
(Sorry if this is a duplicate.)
If I have the following code inside of a module:
```D
class Obj {
private {
string name = "Hi";
}
}
class ObjDerived : Obj {
}
```
Is it best practice to define `ObjDerived` in
On Monday, 15 October 2018 at 04:14:24 UTC, IM wrote:
What is the effect of calling destroy?
- calling the destructor?
- deallocating the memory?
- both?
It calls the destructor. The GC will deallocate the object's
memory later. However, you need to be careful about how you use
GC-allocated
On Monday, 15 October 2018 at 04:14:24 UTC, IM wrote:
What is the effect of calling destroy?
- calling the destructor?
- deallocating the memory?
- both?
IIRC, it only calls the destructor, the GC will decide when to
deallocate the memory.
On Monday, 15 October 2018 at 03:33:04 UTC, Basile B. wrote:
On Monday, 15 October 2018 at 03:19:07 UTC, IM wrote:
I probably used to know the answer to this question, but it's
been a long time since I last used D, and I don't remember.
Suppose we have:
struct S {
int num;
}
Would allocati
On Monday, 15 October 2018 at 03:19:07 UTC, IM wrote:
I probably used to know the answer to this question, but it's
been a long time since I last used D, and I don't remember.
Suppose we have:
struct S {
int num;
}
Would allocating an instance on the heap using:
S* s = new S;
use the GC,
thx sergey my example work correctly now :D
Thu, 06 Aug 2009 10:56:33 -0400, lllTattoolll wrote:
> hi Lars and thx for help. I fix a little the first problem, now I paste a
> verion in english whit coment because i´m lost here.
> the example is the same only this is in english for your compresion of my
> problem.
>
>
Reply to llltattoolll,
writefln ("Your age is %d? \t YES \t NO", _age ); /* here is my second
problem, can´t into the response and program*/
_response = readln(); /* show me else line always */
// if all else fails, what are you getting
writef(">>%s<<\n", cast(ubyte[])chomp(_response));
hi Lars and thx for help. I fix a little the first problem, now I paste a
verion in english whit coment because i´m lost here.
the example is the same only this is in english for your compresion of my
problem.
--
code
--
Lars T. Kyllingstad wrote:
llltattoolll wrote:
hi im noob here and try learn D language, i try make this example but
when run have 2 problems.
1) when i show name and lastname show me in two lines and i wanna make
in the same line.
2) can´t validate option si ( yes ) or no ( no ) and always s
llltattoolll wrote:
hi im noob here and try learn D language, i try make this example but when run
have 2 problems.
1) when i show name and lastname show me in two lines and i wanna make in the
same line.
2) can´t validate option si ( yes ) or no ( no ) and always show the else line.
what hap
11 matches
Mail list logo