User talk:Markjreed: Difference between revisions

From Rosetta Code
Content added Content deleted
(What the heck was that thing?)
 
(Reply to Keithpinson)
Line 4: Line 4:


"%03d".format(v) is the better way to go. Works in older version of Scala. Doesn't invoke the gag reflex.
"%03d".format(v) is the better way to go. Works in older version of Scala. Doesn't invoke the gag reflex.

:(Context: edited [[Middle_three_digits|this page]) I don't recall gagging; for one thing, I'm a Perl guy. :) I figured it was some newfangled feature, but my Google-fu failed me, and the standard install on ubuntu and os x homebrew still gets me 2.9. So as you say, I went with the form that works on older Scala. Thanks for the explanation! [[User:Markjreed|Markjreed]] 02:27, 6 February 2013 (UTC)

Revision as of 02:27, 6 February 2013

what the heck was that 'f"${v}%03d"' thing?

Didn't mean to make you gag. It's string interpolation. Works in Scala 2.10.

"%03d".format(v) is the better way to go. Works in older version of Scala. Doesn't invoke the gag reflex.

(Context: edited [[Middle_three_digits|this page]) I don't recall gagging; for one thing, I'm a Perl guy.  :) I figured it was some newfangled feature, but my Google-fu failed me, and the standard install on ubuntu and os x homebrew still gets me 2.9. So as you say, I went with the form that works on older Scala. Thanks for the explanation! Markjreed 02:27, 6 February 2013 (UTC)