Dylan wrote:
Hi
Is it possible to use the ($test)?$true:$false construction in a (double
quoted) string without dropping out of the string and concatenating? I have
many lines like:
$var = first part of string .(($a==$b)?$c:$d). rest of string;
and I feel it would be more elegant to be able
On 18 Nov 2005, at 20:13, Dylan wrote:
$var = first part of string .(($a==$b)?$c:$d). rest of string;
and I feel it would be more elegant to be able to do something like:
$var =first part of string {(($a==$b)?$c:$d)} rest of string;
Strange as it may seem, you'll probably find that this is
and I feel it would be more elegant to be able to do something like:
$var =first part of string {(($a==$b)?$c:$d)} rest of string;
$templateStr = 'first part of string %s rest of string';
$outputStr = sprintf($templateStr, (($a==$b)?$c:$d));
That is so totally slick! I'm definitely going to
On Mon, 2005-11-21 at 09:42, Chris Boget wrote:
and I feel it would be more elegant to be able to do something like:
$var =first part of string {(($a==$b)?$c:$d)} rest of string;
$templateStr = 'first part of string %s rest of string';
$outputStr = sprintf($templateStr,
Robert Cummings wrote:
On Mon, 2005-11-21 at 09:42, Chris Boget wrote:
and I feel it would be more elegant to be able to do something like:
$var =first part of string {(($a==$b)?$c:$d)} rest of string;
$templateStr = 'first part of string %s rest of string';
$outputStr =
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
Readability is in the eye of the beholder.
But efficiency isn't ;)
Cheers,
Rob
--
..
| InterJinn Application Framework - http://www.interjinn.com |
Robert Cummings wrote:
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
Readability is in the eye of the beholder.
But efficiency isn't ;)
Try measuring the difference between the various methods over a
realistic number of iterations, eg. 100. There's little point in going
through ones
Richard Heyes wrote:
Robert Cummings wrote:
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
Readability is in the eye of the beholder.
But efficiency isn't ;)
yes it is actually - everything is in the eye of the beholder.
it just so happens that we often have consensus ;-)
with
On 21 Nov 2005, at 15:43, Jochem Maas wrote:
using sprintf() is
such a simple case may be excessive BUT I was merely introducing
the OP to
something new (possibly) - anyone asking such 'simple' questions is
not at a stage that this kind of efficiency is an issue (i.e. give
them 'whats
On Mon, 2005-11-21 at 10:31, Richard Heyes wrote:
Robert Cummings wrote:
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
Readability is in the eye of the beholder.
But efficiency isn't ;)
Try measuring the difference between the various methods over a
realistic number of
On Mon, 2005-11-21 at 10:43, Jochem Maas wrote:
Richard Heyes wrote:
Robert Cummings wrote:
On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
Readability is in the eye of the beholder.
But efficiency isn't ;)
yes it is actually - everything is in the eye of the beholder.
it
Hi
Is it possible to use the ($test)?$true:$false construction in a (double
quoted) string without dropping out of the string and concatenating? I have
many lines like:
$var = first part of string .(($a==$b)?$c:$d). rest of string;
and I feel it would be more elegant to be able to do something
On Fri, November 18, 2005 2:13 pm, Dylan wrote:
Is it possible to use the ($test)?$true:$false construction in a
(double
quoted) string without dropping out of the string and concatenating? I
have
many lines like:
$var = first part of string .(($a==$b)?$c:$d). rest of string;
and I feel
Richard Lynch wrote:
On Fri, November 18, 2005 2:13 pm, Dylan wrote:
Is it possible to use the ($test)?$true:$false construction in a
(double
quoted) string without dropping out of the string and concatenating? I
have
many lines like:
$var = first part of string .(($a==$b)?$c:$d). rest of
14 matches
Mail list logo