How should this be done? (1.0)
Derek Parnell
derek at nomail.afraid.org
Mon Feb 4 23:12:17 PST 2008
On Mon, 04 Feb 2008 21:49:50 -0800, Michael Coupland wrote:
> I considered a heredoc string and doing a proper textual
> mixin, but that feels like overkill...
What is 'overkill' about this ...
const char[] CommonCalculations =
r"
bool commonBool1;
bool commonBool2;
{
int LocalVal = SomeFn();
commonBool1 = SomeOtherFunc();
commonBool2 = AThirdFunction(LocalVal,commonBool1);
}
"
. . .
{
mixin (CommonCalculations);
// do stuff here with commonBool1 and commonBool2
}
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
5/02/2008 6:10:32 PM
More information about the Digitalmars-d-learn
mailing list