crusy.net

♪ Commit ins Abenteuerland ♫

Menü:

  • home
  • About
  • feed

Tag Archives for Mario Mushroom Operator

Elegantes Setzen von potentiell nicht initialisierten Variablen

lame:

1
2
3
4
if( ! textPosition )
{
    textPosition = new Point( 100, 100 );
}

kewl:

1
textPosition ||= new Point( 100, 100 );

Danke an Nils.

15. March 2011 by crusy Categories: Coding | Tags: Code, Mario Mushroom Operator, MMO, null, Operator, Zuweisen, Zuweisung | Leave a comment

Post navigation

Proudly powered by WordPress | Theme: Ari by Elmastudio.