Operation Manual

342
Hoofdstuk 20: Alfabetisch naslagregister Functies en instructies
20ATOZEU.DUT Hoofdstuk 20: Alfabetisch naslagregister Functies en instructies Raquel Revised: 02/15/98 1:39 PM Printed: 10/05/98 3:54 PM Page 342 of 12820ATOZEU.DUT Hoofdstuk 20: Alfabetisch naslagregister Functies en instructies Raquel Revised: 02/15/98 1:39 PM Printed: 10/05/98 3:54 PM Page 342 of 128
If
programma-editor
CTL-menu
:If
conditie
:
commando-als-waar
:
commando’s
Als conditie waar is, wordt commando-als-waar
uitgevoerd. Anders wordt commando-als-waar
overgeslagen. De conditie is waar als het resultaat gelijk
is aan elk getal, behalve nul en onwaar als het resultaat
gelijk is aan nul.
Om meerdere commando’s uit te voeren als conditie
waar is, gebruikt u
If:Then:End
.
Programma-onderdeel:
©
:If x<0
:Disp "x is negative"
©
:If
conditie
:Then
:
commando’s-als-waar
:End
:
commando’s
Als conditie waar is (ongelijk aan nul), wordt
commando’s-als-waar van
Then
tot
End
uitgevoerd.
Anders wordt commando’s-als-waar overgeslagen en
wordt de uitvoering voortgezet met het commando dat
volgt na
End
.
Programma-onderdeel:
©
:If x<0
:Then
: Disp "x is negative"
: abs(x)x
:End
©