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
1381
Reply by Mark Angelillo, Jul 18, 2007.

Ah. Thanks. (Fixed)

67
695
Reply by gr, Jul 18, 2007.

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

1026
1381
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
1381
Reply by Mark Angelillo, Jul 18, 2007.

Oh!


Back to Categories

Popular Topics

Top Contributors This Month

125836 Snooth User: dmcker
125836dmcker
95 posts
847804 Snooth User: EMark
847804EMark
75 posts
680446 Snooth User: JonDerry
680446JonDerry
64 posts

Categories

View All




Snooth Media Network