Re: How to use classes from another d files

2019-10-24 Thread Vinod K Chandran via Digitalmars-d-learn
On Thursday, 24 October 2019 at 10:19:23 UTC, Vinod K Chandran wrote: On Tuesday, 22 October 2019 at 18:34:52 UTC, Daniel Kozak wrote: On Tue, Oct 22, 2019 at 8:30 PM Vinod K Chandran via Digitalmars-d-learn wrote: On Tuesday, 22 October 2019 at 17:38:58 UTC, Adam D. Ruppe wrote: > [...]

Re: How to use classes from another d files

2019-10-24 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 18:34:52 UTC, Daniel Kozak wrote: On Tue, Oct 22, 2019 at 8:30 PM Vinod K Chandran via Digitalmars-d-learn wrote: On Tuesday, 22 October 2019 at 17:38:58 UTC, Adam D. Ruppe wrote: > On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K > Chandran wrote: >>

Re: How to use classes from another d files

2019-10-24 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 18:31:17 UTC, Adam D. Ruppe wrote: On Tuesday, 22 October 2019 at 18:21:36 UTC, Vinod K Chandran wrote: But what if there is too many include files ? The dmd -i thing will do that for you dmd -i main.d and it will automatically find the others, assuming they

Re: How to use classes from another d files

2019-10-24 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 18:33:32 UTC, Ali Çehreli wrote: On 10/22/2019 11:25 AM, Vinod K Chandran wrote: > On Tuesday, 22 October 2019 at 17:38:58 UTC, Adam D. Ruppe wrote: >> [...] Chandran wrote: >>> [...] playing >> [...] command line? That: The -i switch is the answer to your

Re: How to use classes from another d files

2019-10-22 Thread Daniel Kozak via Digitalmars-d-learn
On Tue, Oct 22, 2019 at 8:30 PM Vinod K Chandran via Digitalmars-d-learn wrote: > > On Tuesday, 22 October 2019 at 17:38:58 UTC, Adam D. Ruppe wrote: > > On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran > > wrote: > >> Hi all, > >> I am new to D. But some fair experience with vb.net.

Re: How to use classes from another d files

2019-10-22 Thread Ali Çehreli via Digitalmars-d-learn
On 10/22/2019 11:25 AM, Vinod K Chandran wrote: > On Tuesday, 22 October 2019 at 17:38:58 UTC, Adam D. Ruppe wrote: >> On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran wrote: >>> Hi all, >>> I am new to D. But some fair experience with vb.net. I was playing >>> with D classes. I

Re: How to use classes from another d files

2019-10-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 18:21:36 UTC, Vinod K Chandran wrote: But what if there is too many include files ? The dmd -i thing will do that for you dmd -i main.d and it will automatically find the others, assuming they are laid out so the module/import name matches the file name

Re: How to use classes from another d files

2019-10-22 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 17:38:58 UTC, Adam D. Ruppe wrote: On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran wrote: Hi all, I am new to D. But some fair experience with vb.net. I was playing with D classes. I wrote a class in a D file. The file name is "classFile.d" did

Re: How to use classes from another d files

2019-10-22 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 17:40:11 UTC, Arun Chandrasekaran wrote: On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran wrote: Hi all, I am new to D. But some fair experience with vb.net. I was playing with D classes. I wrote a class in a D file. The file name is "classFile.d"

Re: How to use classes from another d files

2019-10-22 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran wrote: Hi all, I am new to D. But some fair experience with vb.net. I was playing with D classes. I wrote a class in a D file. The file name is "classFile.d" ```D class TestClass { [...] What you are seeing is a linker error.

Re: How to use classes from another d files

2019-10-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 22 October 2019 at 17:34:51 UTC, Vinod K Chandran wrote: Hi all, I am new to D. But some fair experience with vb.net. I was playing with D classes. I wrote a class in a D file. The file name is "classFile.d" did you compile with dmd -i or list both files on the dmd command

How to use classes from another d files

2019-10-22 Thread Vinod K Chandran via Digitalmars-d-learn
Hi all, I am new to D. But some fair experience with vb.net. I was playing with D classes. I wrote a class in a D file. The file name is "classFile.d" ```D class TestClass { int myIntVar; string myStringVar ; this(int miv, string msv) { this.myIntVar = miv ;