HP Prime Graphing Wireless Calculator Instrukcja Użytkownika Strona 632

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 631
If test returns a list, commands 1 and commands 2 must return a single object or both must return a list that
is the same size as the list returned by test.
If commands 1 or commands 2 both return a list, each list is the same size and each element is picked from
either commands 1 or commands 2, depending on the outcome of test on the elements of the test list.
CASE
Syntax:
CASE
IF test1 THEN commands1 END;
IF test2 THEN commands2 END;
[ DEFAULT commands]
END;
Evaluates test1. If true, executes commands1 and ends the CASE. Otherwise, evaluates test1. If true, executes
commands2 and ends the CASE. Continues evaluating tests until a true is found. If no true test is found,
execute default commands, if provided. The CASE command is limited to 127 branches.
Example:
CASE
IF A<0 THEN RETURN "negative"; END;
IF 0≤A≤1 THEN RETURN "small"; END;
DEFAULT RETURN "large";
END;
IFERR
IFERR commands1 THEN commands2 END;
Executes sequence of commands1. If an error occurs during execution of commands1, executes sequence of
commands2.
NOTE: The error number is stored in the variable Ans. You can use this variable in the commands2 syntax of
the THEN clause of the IFERR command.
IFERR ELSE
IFERR commands1 THEN commands2 ELSE commands3 END;
Executes sequence of commands1. If an error occurs during execution of commands1, executes sequence of
commands2. Otherwise, execute sequence of commands3.
Loop
FOR
Syntax: FOR var FROM start TO nish DO commands END;
584 Chapter 28 Programming in HP PPL
Przeglądanie stron 631
1 2 ... 627 628 629 630 631 632 633 634 635 636 637 ... 700 701

Komentarze do niniejszej Instrukcji

Brak uwag