.title iferr ; this function returns the value of the ; first argument. ; If this is an error then the appropriate error message ; text is output, the user-supplied string is output, ; and the image exits. ; ; USAGE: ; J = IFERR(SYS$SETEF(%VAL(FTHEM)),'RJEMASTER UNABLE TO SETEF') ; iferr:: .word ^m movl @4(ap),r0 blbc r0,doit ret doit: clrl -(sp) pushl r0 pushl #1 moval (sp),r2 movq @8(ap),desc $putmsg_s msgvec=(r2),actrtn=ifexit $exit_s code=@4(ap) desc: .quad 0 ifexit: .word 0 movq desc,@4(ap) ret .end