Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger
| Name |
Obiekt |
| Examples |
// Declare and contruct two objects (h1, h2) from the class 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
class 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 |
Obiekts are instances of classes. A class is a grouping of related methods (functions) and fields (variables and constants). |
| Syntax |
classinstance |
| Parameters |
| class |
the class to created the object from |
| instance |
any variable name |
|
| Usage |
Web & Application |
| Related |
Klass
|
Stefan Baltensperger 2009