;+ ; NAME: ; USERNAME ; PURPOSE: ; To return the name of the current IDL user. ; CATEGORY: ; Utility, information. ; CALLING SEQUENCE: ; uname = USERNAME() ; INPUTS: ; None. ; OUTPUTS: ; The username of the current IDL user. ; OPTIONAL OUTPUT PARAMETERS: ; None. ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; None. ; RESTRICTIONS: ; As presently implemented this routine will not work on a VAX/VMS system. ; PROCEDURE: ; On a UNIX system the 'whoami' command is SPAWNed. On a Windows system ; the username defaults to 'cnsr3'. ; MODIFICATION HISTORY: ; Written: DPS, ISAS, 950817. ;- FUNCTION username @isitdos IF dos THEN RETURN,'cnsr3' ELSE BEGIN SPAWN,'whoami',username RETURN,username ENDELSE END