HP NW280AAABA Uživatelský manuál Strana 534

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 616
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 533
528 Programming in HP PPL
Commands under the Tmplt menu
Block
The block commands determine the beginning and end of
a sub-routine or function. There is also a Return
command to recall results from sub-routines or functions.
BEGIN END Syntax: BEGIN command1; command2;…;
commandN; END;
Defines a command or set of commands to be executed
together. In the simple program:
EXPORT SQM1(X)
BEGIN
RETURN X^2-1;
END;
the block is the single RETURN command.
If you entered SQM1(8) in Home view, the result returned
would be 63.
RETURN Syntax: RETURN expression;
Returns the current value of expression.
KILL Syntax: KILL;
Stops the step-by-step execution of the current program
(with debug).
Branch
In what follows, the plural word commands refers to both
a single command or a set of commands.
IF THEN Syntax: IF test THEN commands END;
Evaluate test. If test is true (not 0), executes commands.
Otherwise, nothing happens.
IF THEN ELSE Syntax: IF test THEN commands1 ELSE commands 2
END;
Evaluate test. If test is true (non 0), executes commands 1,
otherwise, executes commands 2
Zobrazit stránku 533
1 2 ... 529 530 531 532 533 534 535 536 537 538 539 ... 615 616

Komentáře k této Příručce

Žádné komentáře