| Subject: | XploRe: Learning Guide |
| See XploRe: |
| Quantlet: | quant14 | |
| Description: | Square root with error, if the argument is negative. | |
| Download: | quant14.xpl |
proc() = test(x) ; defines a procedure
error(x<0,"Negative argument!")
; displays an error box containing the
; specified text and stops the program
; in case x is negative
sqrt(x) ; computes the square root in case the
; preceding command did not lead to
; a break of the program
endp ; end of the procedure
;
test(-4) ; runs the procedure with value -4
| Subject: | XploRe: Learning Guide |
| See XploRe: |