Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger
| Name |
Klass |
| Examples |
// Declare and contruct two objects (h1, h2) from the Klass HLine
HLine h1 = neus HLine(20, 2.0);
HLine h2 = neus HLine(50, 2.5);
Programmteil wo_am_afang_gmacht_wird()
bitte
Feischtergroessi(200, 200);
Gschwindigkeit(30);
danke
Programmteil wo_immerwider_gmacht_wird() bitte
Hintergrund(204);
h1.update();
h2.update();
danke
Klass HLine bitte
Komazahl ypos, speed;
HLine (Komazahl y, Komazahl s) bitte
ypos = y;
speed = s;
danke
Programmteil update() bitte
ypos += speed;
if (ypos > Feischterbreiti) bitte
ypos = 0;
danke
Linie(0, ypos, Feischterbreiti, ypos);
danke
danke |
| Description |
Keyword used to indicate the declaration of a Klass. A Klass is a composite of data and methods (functions) which may be instantiated as objects. The first letter of a Klass name is usually upperFalls to separate it from other kinds of variables. A related tutorial on Object-Oriented Programming is hosted from the Sun website. |
| Syntax |
Klass KlassName bitte
statements
danke |
| Parameters |
| KlassName |
Any valid variable name |
| statements |
any valid statements |
|
| Usage |
Web & Application |
| Related |
Obiekt
|
Stefan Baltensperger 2009