On Sunday, 30 April 2017 at 19:05:18 UTC, bauss wrote:
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc
On 04/30/2017 09:05 PM, bauss wrote:
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
[...]
~ is for string concatenation, i.e.:
[...]
It's not actually a string concatenation operator, it's an array
appending operator.
Appending is related but distinct. `~` does concatenation. `~=`
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote:
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~ is for s
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
You normally use double equation marks (==) to do that.
auto name = "Jack";
if( name == "Jack" ) writeln("Hi Jack!");
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
Yeah, just the usual comparison operators:
"abc" == "abc"
"abc" != "ABC"
~ is for string concatenation, i.e.:
"abc" ~ "def" == "abcdef"
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
Is there a String Comparison Operator in D?
~
Is there a String Comparison Operator in D?
On 12/21/2010 10:51 PM, Jonathan M Davis wrote:
With newsgroups, I never got the moderation warning either.
But I did get that moderation message and then waited almost a day to
see my message in the list. But this happened only to the first message
in each list.
The first message sent to
20.12.2010 22:06, Steven Schveighoffer пишет:
On Mon, 20 Dec 2010 14:05:56 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Mon, 20 Dec 2010 11:13:34 -0500, Stanislav Blinov
bli...@loniir.ru wrote:
And lastly, hasn't this by chance been your first post? AFAIR, the
first message is
On Tue, 21 Dec 2010 11:12:00 -0500, Stanislav Blinov bli...@loniir.ru
wrote:
20.12.2010 22:06, Steven Schveighoffer пишет:
On Mon, 20 Dec 2010 14:05:56 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Mon, 20 Dec 2010 11:13:34 -0500, Stanislav Blinov
bli...@loniir.ru wrote:
On Tue, 21 Dec 2010 11:49:42 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
Hm... I always use a newsgroup client, so maybe. But in any case, I've
never known anyone to have been blocked from posting, and the newsgroup
interface does not have any moderation on it. I'd be surprised
21.12.2010 19:55, spir пишет:
On Tue, 21 Dec 2010 11:49:42 -0500
Steven Schveighofferschvei...@yahoo.com wrote:
Hm... I always use a newsgroup client, so maybe. But in any case, I've
never known anyone to have been blocked from posting, and the newsgroup
interface does not have any
On Tuesday, December 21, 2010 09:36:20 Stanislav Blinov wrote:
21.12.2010 19:55, spir пишет:
On Tue, 21 Dec 2010 11:49:42 -0500
Steven Schveighofferschvei...@yahoo.com wrote:
Hm... I always use a newsgroup client, so maybe. But in any case, I've
never known anyone to have been
In general though, it's preferred that you post a link to code rather than
attach it
I'll try to remember that.
On Sun, 19 Dec 2010 07:01:30 +, doubleagent wrote:
Andrei's quick dictionary illustration [in his book, 'The D Programming
Language'] doesn't seem to work. Code attached.
That's strange. I ran the example you posted using DMD 2.050 myself, and
it works for me. Are you 100% sure that
20.12.2010 8:35, doubleagent пишет:
Compared to the relatively snappy response other threads have been receiving I'm
going to assume that nobody is interested in my inquiry.
That's cool. Can anybody point me to an IRC chatroom for D noobs, and is there
anywhere to post errata for the book?
On Monday, December 20, 2010 06:01:23 Lars T. Kyllingstad wrote:
On Sun, 19 Dec 2010 07:01:30 +, doubleagent wrote:
Andrei's quick dictionary illustration [in his book, 'The D Programming
Language'] doesn't seem to work. Code attached.
That's strange. I ran the example you posted
On Mon, 20 Dec 2010 00:35:53 -0500, doubleagent doubleagen...@gmail.com
wrote:
Compared to the relatively snappy response other threads have been
receiving I'm
going to assume that nobody is interested in my inquiry.
Just a tip, don't expect snappy responses on Sunday... We all have
Are you 100% sure that you are running this version
I have to be. There are no other versions of phobos on this box and 'which dmd'
points to the correct binary.
dictionary[word.idup] = newId;
That fixes it.
The 'word' array is mutable and reused by byLine() on each iteration. By
doing
I understand. Thank you, and thanks for pointing out the chatroom.
On Mon, 20 Dec 2010 11:13:34 -0500, Stanislav Blinov bli...@loniir.ru
wrote:
And lastly, hasn't this by chance been your first post? AFAIR, the first
message is being moderated so it doesn't get to the public at once.
BTW, this message board is not moderated.
-Steve
On Mon, 20 Dec 2010 14:05:56 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Mon, 20 Dec 2010 11:13:34 -0500, Stanislav Blinov bli...@loniir.ru
wrote:
And lastly, hasn't this by chance been your first post? AFAIR, the
first message is being moderated so it doesn't get to the
The reason that std.string.splitter() does not show in the documentation is
that
its return type is auto, and there is currently a bug in ddoc that makes it so
that auto functions don't end up in the generated documentation. Looking at
the
code, it pretty much just forwards to
On Monday, December 20, 2010 10:44:12 doubleagent wrote:
Are you 100% sure that you are running this version
I have to be. There are no other versions of phobos on this box and 'which
dmd' points to the correct binary.
dictionary[word.idup] = newId;
That fixes it.
The 'word'
On Mon, 20 Dec 2010 18:44:12 +, doubleagent wrote:
Are you 100% sure that you are running this version
I have to be. There are no other versions of phobos on this box and
'which dmd' points to the correct binary.
dictionary[word.idup] = newId;
That fixes it.
The 'word' array
Okay. I don't know what the actual code looks like
Here.
import std.stdio, std.string;
void main() {
uint[string] dictionary; // v[k], so string-uint
foreach (line; stdin.byLine()) {
// break sentence into words
// Add each word in the sentence
This could be related to bug 2954, for which a fix will be released in
the next version of DMD.
Looking at that new descriptive error message ie error(associative arrays can
only be assigned values with immutable keys, not %s, e2-type-toChars()); it
appears to be a distinct possibility.
On Monday, December 20, 2010 16:45:20 doubleagent wrote:
Okay. I don't know what the actual code looks like
Here.
import std.stdio, std.string;
void main() {
uint[string] dictionary; // v[k], so string-uint
foreach (line; stdin.byLine()) {
// break
Good I agree.
Compared to the relatively snappy response other threads have been receiving I'm
going to assume that nobody is interested in my inquiry.
That's cool. Can anybody point me to an IRC chatroom for D noobs, and is there
anywhere to post errata for the book?
On Saturday 18 December 2010 23:01:30 doubleagent wrote:
Andrei's quick dictionary illustration [in his book, 'The D Programming
Language'] doesn't seem to work. Code attached.
On my computer, with d2-0.5.0, I got the following output while testing.
andrei
0 andrei
andrei
1
Check your client setting, everything is perfect on my side (Opera
built-in news client).
Andrei's quick dictionary illustration [in his book, 'The D Programming
Language'] doesn't seem to work. Code attached.
On my computer, with d2-0.5.0, I got the following output while testing.
andrei
0 andrei
andrei
1 andrei
Also, why doesn't 'splitter' show up on the site's
33 matches
Mail list logo