home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / vmsnet / tpu / 600 < prev    next >
Encoding:
Text File  |  1993-01-22  |  2.7 KB  |  70 lines

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
  2. From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
  3. Newsgroups: vmsnet.tpu
  4. Subject: Re: What is TPU_CALLUSER?
  5. Date: 22 Jan 1993 09:38:43 GMT
  6. Organization: HST Wide Field/Planetary Camera
  7. Lines: 57
  8. Message-ID: <1jofb4INNt5t@gap.caltech.edu>
  9. References: <1jjngtINN1er@usenet.INS.CWRU.Edu>
  10. Reply-To: carl@SOL1.GPS.CALTECH.EDU
  11. NNTP-Posting-Host: sol1.gps.caltech.edu
  12.  
  13. In article <1jjngtINN1er@usenet.INS.CWRU.Edu>, at913@cleveland.Freenet.Edu (Mirko Vukovic) writes:
  14. >What is TPU_CALLUSER?  What does it do?
  15.  
  16. TPU_CALLUSER isn't anything (except a string of characters you've put
  17. together).  The CALL_USER primitive in TPU is a function that allow you to call
  18. you own routine* and have it perform a task for you.  Since you're evidently
  19. incapable of using the HELP facility, here's the on-line help for the primitive:
  20.  
  21.   CALL_USER
  22.  
  23.       Calls a program written in another language from within VAXTPU.
  24.       CALL_USER parameters are passed to the external program exactly as you
  25.       enter them; VAXTPU does not process them in any way.
  26.  
  27.    Syntax
  28.  
  29.       string2 := CALL_USER (integer, string1)
  30.  
  31.    Parameters
  32.  
  33.       integer    The integer passed to the external program by reference.
  34.  
  35.       string1    The string passed to the external program by descriptor.
  36.  
  37.    Note:  For an example of how to use CALL_USER with a BASIC program, see
  38.           the VAX Text Processing Utility Manual.
  39.  
  40. Now, a bit more information, assuming you're capable of assimilating it:
  41.     CALL_USER calls a subroutine (TPU$CALLUSER) in an executable (by
  42. default SYS$SHARE:TPU$CALLUSER.EXE) with three arguments:
  43.     1)  A read-only number passed by reference;
  44.     2)  A read-only string, passed by descriptor;
  45.     3)  A write-only dynamic string, passed by descriptor.
  46. You can change the image used by defining the logical name TPU$CALLUSER.
  47. An example of a CALL_USER routine (which returns the translation of the string
  48. passed in the second argument) follows:
  49.  
  50. $ CREATE CALLUSER.C
  51. #include descrip
  52.  
  53. long tpu$calluser(int *number, struct dsc$descriptor *string, struct
  54.     dsc$descriptor *retval)
  55. {    LIB$GET_SYMBOL(string, retval);
  56.     return(1);
  57. }
  58. $ CC CALLUSER
  59. $ LINK CALLUSER,SYS$INPUT:/OPT
  60. UNIVERSAL=TPU$CALLUSER
  61.  
  62. --------------------------------------------------------------------------------
  63. Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  64.  
  65. Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
  66. understanding of astronomy is purely at the amateur level (or below).  So
  67. unless what I'm saying is directly related to VAX/VMS, don't hold me or my
  68. organization responsible for it.  If it IS related to VAX/VMS, you can try to
  69. hold me responsible for it, but my organization had nothing to do with it.
  70.