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

1024
1382
Reply by Mark Angelillo, Jul 18, 2007.

Ah. Thanks. (Fixed)

67
695
Reply by gr, Jul 18, 2007.

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

1024
1382
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.

1024
1382
Reply by Mark Angelillo, Jul 18, 2007.

Oh!


Back to Categories

Top Contributors This Month

1498622 Snooth User: Really Big Al
1498622Really Big Al
67 posts
1413489 Snooth User: dvogler
1413489dvogler
66 posts
847804 Snooth User: EMark
847804EMark
56 posts

Categories

View All




Snooth Media Network