Another Runtime Error - Adobe 12001196 - Acrobat - Mac Manual

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

F
IGURE

Another runtime error

1. Enter 9 + 3 =
The result of evaluation is 3. This is indicates another runtime error.
2. If you didn't delete your watches from the previous session, you can reuse them. For
each watch, select the watch in the Inspect details window. Click Edit and OK.
The variable becomes undefined.
3. In the Scripts window, navigate to the Equals script.
4. Set a breakpoint at the function call update_result();
5. Quit the debugger.
6. Clear the display if necessary.
7. Enter 9 + 3 =
This enters the debugger and stops execution at the breakpoint.
8. Single step through the function update_result().
Note the statements executing and the values of the watches. Execute the first case
statement:
accum = entry; // This is incorrect.
This is incorrect. The value of entry should be added to accum. Correct the error:
accum = accum + entry;
Acrobat JavaScript Scripting Guide
3.10
The value of accum is not updated
Acrobat JavaScript Debugger
Exercise: Calculator
3
51

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents