How can I use a file that is inside resource .res?

2019-12-28 Thread Marcone via Digitalmars-d-learn
I created a file called "resource.rc" with this content: 1 ICON icon.ico 2 EXE app.exe And compiled with this command: windres.exe resource.rc resource.res And I binf it to my program with this command: dmd Program.d resource.res Now I have a Program.exe with "app.exe" inside. Now the file

Re: [OT] What kind of Editor, IDE you are using and which one do you like for D language?

2019-12-28 Thread Dennis Cote via Digitalmars-d-learn
On Tuesday, 24 December 2019 at 17:52:20 UTC, H. S. Teoh wrote: I just can't wait to see some poor sod attempt to reimplement a modern IDE in Javascript and succeed at reproducing 1980's IDE speeds and (lack of) quality. Texas Instruments has already done this with its Code Composer Studio

Re: Stupid global variable syntax question...

2019-12-28 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 29 December 2019 at 03:45:03 UTC, WhatMe Worry wrote: Is it considered poor programming practice to have two modules import each other? I've got lots of global variables (i know bad programming) in the module with main() module app; import game; // __gshared stores the

Stupid global variable syntax question...

2019-12-28 Thread WhatMe Worry via Digitalmars-d-learn
Is it considered poor programming practice to have two modules import each other? I've got lots of global variables (i know bad programming) in the module with main() module app; import game; // __gshared stores the variable in the classic global data segment. __gshared enum bool

Re: Default values in derived class

2019-12-28 Thread JN via Digitalmars-d-learn
On Saturday, 28 December 2019 at 22:12:38 UTC, Johan Engelen wrote: What Mike is saying is that `Base` has one `b` member variable, but `Derived` has two (!). ``` writeln(d.b); // false writeln(d.Base.b); // true (the `b` member inherited from Base) ``` -Johan That makes sense. I think the

Re: Default values in derived class

2019-12-28 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 28 December 2019 at 20:47:38 UTC, Mike Parker wrote: On Saturday, 28 December 2019 at 20:22:51 UTC, JN wrote: import std.stdio; class Base { bool b = true; } class Derived : Base { bool b = false; } void main() { // 1 Base b = new Derived(); writeln(b.b); // true

Re: What kind of Editor, IDE you are using and which one do you like for D language?

2019-12-28 Thread p.shkadzko via Digitalmars-d-learn
On Sunday, 22 December 2019 at 17:20:51 UTC, BoQsc wrote: There are lots of editors/IDE's that support D language: https://wiki.dlang.org/Editors What kind of editor/IDE are you using and which one do you like the most? Tried almost all of them that support D including Dlang IDE, Dexed,

Re: Default values in derived class

2019-12-28 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 28 December 2019 at 20:22:51 UTC, JN wrote: import std.stdio; class Base { bool b = true; } class Derived : Base { bool b = false; } void main() { // 1 Base b = new Derived(); writeln(b.b); // true // 2 Derived d = new Derived(); writeln(d.b); // false }

Default values in derived class

2019-12-28 Thread JN via Digitalmars-d-learn
import std.stdio; class Base { bool b = true; } class Derived : Base { bool b = false; } void main() { // 1 Base b = new Derived(); writeln(b.b); // true // 2 Derived d = new Derived(); writeln(d.b); // false } Expected behavior or bug? 1) seems like a bug to me.

Re: [OT] What kind of Editor, IDE you are using and which one do you like for D language?

2019-12-28 Thread Ron Tarrant via Digitalmars-d-learn
On Tue, Dec 24, 2019 at 10:18:49AM +, Russel Winder via Surely a hardcore retro guy would be using vi not vim? On Tuesday, 24 December 2019 at 17:52:20 UTC, H. S. Teoh wrote: Haha, well, a *real* hardcore retro guy would be using a magnet, a pin, and a *really* steady hand, to flip