Using the Error Function
This commit is contained in:
@@ -62,7 +62,7 @@ fun -int !factorial -int &in
|
||||
return $ans
|
||||
|
||||
@error
|
||||
divide 1 0 &store
|
||||
error "Cannot find factorial of a negative integer"
|
||||
endfun
|
||||
|
||||
fun -double !cos -double &in
|
||||
@@ -206,4 +206,8 @@ fun -double !sqrt -double &in
|
||||
return $ans
|
||||
|
||||
@error
|
||||
endfun
|
||||
error "Cannot find square root of a negative double"
|
||||
endfun
|
||||
|
||||
pusharg -0.5
|
||||
call !sqrt &store
|
Reference in New Issue
Block a user