Trying to compile sample from The D Programming Language book.

Jesus Alvarez jeezusjr at gmail.com
Sun Apr 3 23:44:11 PDT 2011


I reported the error to the author. Thanks guys!

On Sun, Apr 3, 2011 at 3:34 AM, spir <denis.spir at gmail.com> wrote:

> On 04/03/2011 09:38 AM, Jesus Alvarez wrote:
>
>> I got it to compile adding std.regex to split to make it:
>>
>> auto words = std.regex.split (sentence, regex("[ \t,.;:?]+"));
>>
>> So now my question is, is this an error in the book? The errata doesn't
>> mention anything about this section.
>>
>
> If the TDPL code does not prefix split then, yes, it is an error. (In fact,
> there was maybe no regex split at the time it was written.) You may add it
> at the errata page mentionned by Jonathan.
>
>
>   Why do I have to prepend std.regex?
>>
>
> How can the compiler guess you mean std.regex.split; and not
> std.string.split, if you don't tell it?
>
> Denis
> --
> _________________
> vita es estrany
> spir.wikidot.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110403/82fcc679/attachment.html>


More information about the Digitalmars-d-learn mailing list