title et
text "Lower plot limit"
text "must be less than"
text "upper plot limit"
enddlog
goto l1
©Validate plot resolution
elseif res≤0 or fpart(res)≠0 then
dialog
title et
text "Resolution must be an"
text "integer greater than zero"
enddlog
goto l1
©Validate data plot number
elseif dpn≤0 or dpn>99 or fpart(dpn)≠0 then
dialog
title et
text "Data plot number must be"
text "an integer 1 to 99"
enddlog
goto l1
endif
©Plot the integral
plotintg(igrand,lil,lpl,upl,dpn,res)
pause
goto l1
©Exit
lbl l2
setmode(umode) ©Restore modes
EndPrgm
This program works on both the 89 and 92+. The input dialog box looks like this on the 92+:
Note that all the input parameters can be entered, as expected, and that the integrand can be entered
as an expression or a string. The program saves the user's modes and restores them when the
program is done. Press [ESC] from this dialog box to exit the program, or press [ENTER] to plot the
integral. The plot is shown until you press [ENTER], then the input dialog box is displayed again. This
lets you make more than one plot without restarting the program.
The program creates several global variables, so that you do not need to re-enter the parameters to
repeat a plot. Therefore, the global variables are not deleted. These variables are
4 - 14