mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-04 22:08:32 +00:00
made newlines so that the content is not more than 80 char
This commit is contained in:
parent
42ce472cf9
commit
f3f32e2d81
@ -44,7 +44,8 @@ if(hour < 12) { /*Operatoren sind genau wie in C*/
|
|||||||
} else {
|
} else {
|
||||||
/* Standardmässig sind Variablen global. */
|
/* Standardmässig sind Variablen global. */
|
||||||
thisIsGlobal = 5
|
thisIsGlobal = 5
|
||||||
/*Variablen können lokal gemacht werden. Benutze das Schlüsselwort "auto" in einer Funktion.*/
|
/*Variablen können lokal gemacht werden. Benutze das Schlüsselwort "auto"
|
||||||
|
in einer Funktion.*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Jede Variable hat als Voreinstellung den Wert 0. */
|
/* Jede Variable hat als Voreinstellung den Wert 0. */
|
||||||
@ -84,7 +85,8 @@ define x(n) {
|
|||||||
return n + x
|
return n + x
|
||||||
}
|
}
|
||||||
x(3) /*4*/
|
x(3) /*4*/
|
||||||
print x /*Es stellt sich heraus, dass x ausserhalb der Funktion nicht zugänglich ist.*/
|
print x /*Es stellt sich heraus, dass x ausserhalb der Funktion nicht
|
||||||
|
zugänglich ist.*/
|
||||||
/*Arrays sind äquivalent zu C Arrays.*/
|
/*Arrays sind äquivalent zu C Arrays.*/
|
||||||
for(i = 0; i <= 3; i++) {
|
for(i = 0; i <= 3; i++) {
|
||||||
a[i] = 1
|
a[i] = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user