home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5217 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!decwrl!pa.dec.com!engage.pko.dec.com!nntpd.lkg.dec.com!telfon.enet.dec.com!mailman
  3. From: mailman@telfon.enet.dec.com (Steven M. Mailman)
  4. Subject: Re: Getting the USERNAME in VAX Pascal
  5. Message-ID: <1992Sep6.184804.7906@nntpd.lkg.dec.com>
  6. Sender: usenet@nntpd.lkg.dec.com (USENET News System)
  7. Organization: Digital Equipment Corporation
  8. Date: Sun, 6 Sep 1992 19:39:33 GMT
  9. Lines: 30
  10.  
  11.  
  12. In article <1992Sep4.194704.20456@cs.unca.edu>, snodgras@cs.unca.edu (Ryan Snodgrass) writes...
  13.  
  14. >Can anyone tell me the best way to get the Username using VAX Pascal and
  15. >any libraries.  Thanks.  Examples will be helpful.
  16.  
  17. [INHERIT('sys$library:starlet',
  18.          'sys$library:pascal$lib_routines')]
  19.  
  20. PROGRAM get_name ( output );
  21.  
  22. VAR
  23.     username : PACKED ARRAY [1..12] OF Char;
  24.     status   : Integer;
  25.  
  26. BEGIN
  27. status := lib$getjpi(jpi$_username,,,,username);
  28. Writeln(username);
  29. END.
  30.  
  31. Also, there are many on-line examples in directory PASCAL$EXAMPLES
  32. (if it was installed along with compiler).
  33.  
  34. ------
  35. Steve Mailman
  36. Digital Equipment Corporation
  37. mailman@tle.enet.dec.com
  38. Disclaimer:  The opinions and statements expressed by me are not
  39.              necessarily those of Digital Equipment Corporation.
  40.  
  41.