string object won't compile
askjfbd
icadraic9 at gmail.com
Tue Mar 6 00:55:00 UTC 2018
On Tuesday, 6 March 2018 at 00:18:14 UTC, psychoticRabbit wrote:
> On Monday, 5 March 2018 at 23:34:50 UTC, askjfbd wrote:
>> Someone please tell me how, for I am a newbie and don't know
>> any solutions even to this very simple problem. As I learned
>> dlang using the Dlang tour page, I stuck at the alias &
>> Strings page. I have tried to compile the following simple
>> code many times but still get the same error both from dmd and
>> gdc. They both say that...
>
> This is mistake I made too, when i began using D.
>
> I quickly got into the habit of putting
>
> module test;
>
> at the beginning of every file I create, unless I determine a
> better module name.
>
> Actually, I wrote my own IDE, so it does that for me whenever I
> select a new D file.
>
> Personally, I think that is one of the first things newcomers
> need to learn about - modules.
>
> -------------
> "Modules have a one-to-one correspondence with source files.
> The module name is, by default, the file name with the path and
> extension stripped off, and can be set explicitly with the
> module declaration."
>
> "Modules automatically provide a namespace scope for their
> contents."
>
> https://dlang.org/spec/module.html
>
> ------------
Thank you. I will learn about modules from now on. I thought I
was right until you two replied to me. ;) Can you make your own
IDE? That's great! If it were OpenSource, I would gladly download
it for myself to avoid this sort of annoying experience. Thanks.
More information about the Digitalmars-d-learn
mailing list