10 sub TPU$CALLUSER ( some_integer% , input_string$ , return_string$ ) !++ ! FACILITY: TPU$calluser routine ! ! ABSTRACT: Provide access to multiple TPU Calluser routines ! based on passed integer. ! Does a find_image to activate the correct calluser ! then does Callg to it. ! Precondition: each integer must have a logical name ! associated with it. 0 = TPU$CALLUSER0 ! 1 = TPU$CALLUSER1 ! 2 = TPU$CALLUSER2 ... !-- 20 external long function lib$find_image_symbol external long function lib$callg external integer function lib$signal external long constant ss$_normal declare long ret_code ! local return code declare long send_address ! address in shareable image declare long arg_list (3) ! passed to callg suffix$ = str$( some_integer% ) ! get the number as a string ! logical name of the shared image shared_image$ = "TPU$CALLUSER" + suffix$ entry_point$ = "TPU$CALLUSER" ! entry point ret_code = lib$find_image_symbol ( shared_image$ , & entry_point$ , & send_address & ) if ret_code = ss$_normal then else tpu$calluser = ret_code exit sub end if arg_list (0) = 3 ! number of arguements arg_list (1) = loc ( some_integer% ) ! address arg_list (2) = loc ( input_string$ ) ! address arg_list (3) = loc ( return_string$ ) ! address ret_code = lib$callg( arg_list (0) by ref , send_address by value ) if ret_code = ss$_normal then else return_string$ = "" end if tpu$calluser = ret_code 999 all_done: ! return_string$ is defined end sub