Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
// variablen deklaration
int x1 = 15;
float valF = 0.323;
boolean bFlag = false;
String message = "hallo 1";
char character = 'g';
 
String msg1 = new String("hallo 2");
 
println(x1);
println(valF);
println(bFlag);
println(message);
println(character);
println(msg1);

 


Natürlich kann man Variablen auch kopieren:

...

Code Block
int length1 = 150;
int length2 = 200;
 
size(300,300); // def. fenstergroesse
background(0); // def. hintergrundfarbe
smooth(); // aktiviere antialiasing
stroke(255,255,255); // def. zeichenfarbe
 
line(100,10,100,length1); // zeichne eine linie
line(150,10,150,length2);
line(200,10,200,250);
 
fill(0,0,0); // def. fuellfarbe
strokeWeight(5); // strichstaerke
ellipse(100,length1,50,50); // zeichen eine ellipse
ellipse(150,length2,50,50); // zeichen eine ellipse
noFill(); // keine fuellung
ellipse(200,250,50,50); // zeichen eine ellipse

 

...