Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger

Name

return

Examples
Ganzizahl val = 30;
 
Programmteil wo_immerwider_gmacht_wird() bitte
  Ganzizahl t = timestwo(val);
  schrib_uf_e_neui_Linie(t);
danke

Ganzizahl timestwo(Ganzizahl dVal) bitte
  dVal = dVal * 2;
  gib_zrug dVal;
danke

Ganzizahl[] vals = bitte10, 20, 30danke; 
  
Programmteil wo_immerwider_gmacht_wird() bitte 
  Ganzizahl[] t = timestwo(vals); 
  schrib_uf_e_neui_Linie(t); 
  kein_Luup();
danke 
 
Ganzizahl[] timestwo(Ganzizahl[] dVals) bitte 
  solang(Ganzizahl i = 0; i  dVals.laengi; i  immereisdezue) bitte 
    dVals[i] = dVals[i] * 2; 
  danke 
  gib_zrug dVals; 
danke

Programmteil wo_immerwider_gmacht_wird() bitte
  Hintergrund(204);
  Linie(0, 0, Feischterbreiti, Feischterhoechi);
  waen(Muus_truckt) bitte
    return;
  danke
  Linie(0, Feischterhoechi, Feischterbreiti, 0);
danke
Description Keyword used to indicate the value to gib_zrug from a function. The value being returned must be the same datatype as defined in the function declaration. Functions declared with Programmteil can't gib_zrug values and shouldn't include a gib_zrug value. The Taschte word return may also be used to Faertig out of a function thus not allowing the program to read the remaining statements (see the third example above).
Syntax
typefunction bitte
  statements
  gib_zrug value
danke
Parameters
type EisoderNull, Chlinizahl, Buechstabe, Ganzigahl, Komazahl , Satz, EisoderNull[], Chlinizahl[], Buechstabe[], Ganzizahl[], Komazahl [], Satz[]
function any function that is being defined
statements any valid statements
value must be the same datatype as the type parameter
Usage Web & Application
Stefan Baltensperger 2009

Creative Commons License