Site Feedback

Snooth User: gr

Pluralization in friends

Posted by gr, Jul 18, 2007.

My parents and my friend Mike Harding have rated 1 wine, not 1 wines.

http://eclipsed.net/~gr/Pictures/20...

Replies

1026
1380
Reply by Mark Angelillo, Jul 18, 2007.

Ah. Thanks. (Fixed)

67
695
Reply by gr, Jul 18, 2007.

"WINE" . ($#wines > 0) ? "S" : "" ftw.

1026
1380
Reply by Mark Angelillo, Jul 18, 2007.

Wait. Unless I'm missing something you want the 'S' when number of wines != 1.

67
695
Reply by gr, Jul 18, 2007.

I do, and your fix does that. So does my code, but in Perl.

When there's one item in an array (@) in Perl, $#array == 0 (because element 0 is filled). When you undef @array, then $#array == -1.

1026
1380
Reply by Mark Angelillo, Jul 18, 2007.

Oh!


Back to Categories

Top Contributors This Month

125836 Snooth User: dmcker
125836dmcker
89 posts
127503 Snooth User: rckr1951
127503rckr1951
75 posts
262583 Snooth User: Richard Foxall
262583Richard Foxall
64 posts

Categories

View All




Snooth Media Network