comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: clear, who
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: clear, who [message #19828 is a reply to message #19826] Thu, 20 April 2000 00:00 Go to previous message
Theo Brauers is currently offline  Theo Brauers
Messages: 58
Registered: November 1997
Member
I dont know matlab but "who" sounds like a rockband :-)
or like my user_at_host function which I attached at
the end of this message.

Theo

bertram_b_smith@yahoo.com wrote:
>
> Dear all,
> how can I do in IDL something like the matlab 'clear' and 'who'?
> Thank you,
> Bert
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

user_at_host.pro
--------------------------------------
; Copyright (c) 1998, Theo Brauers, Forschungszentrum Juelich GmbH ICG-3
; All rights reserved. Unauthorized reproduction prohibited.
; This software may be used, copied, or redistributed as long as it is not
; sold and this copyright notice is reproduced on each copy made. This
; routine is provided as is without any express or implied warranties
; whatsoever. Email bug reports to th.brauers@fz-juelich.de
;
;+
; NAME:
; user_at_host
;
; PURPOSE:
; This function returns user and host names
;
; CATEGORY:
; PROG_TOOLS/STRINGS
;
; CALLING SEQUENCE:
; Result = USER_AT_HOST([/MESSAGE])
;
; KEYWORD PARAMETERS:
; MESSAGE: if set a message is printed
;
; OUTPUTS:
; This function returns a string username@hostname
;
; EXAMPLE:
; print, user_at_host()
; IDL prints:
; ich306@ICH355

; MODIFICATION HISTORY:
; Written by: Theo Brauers, 1998-OKT
;-
FUNCTION user_at_host, MESSAGE=message

IF !version.os_family EQ 'unix' THEN BEGIN
u=GETENV('USER') & h=GETENV('SESSION_SVR')
ENDIF ELSE BEGIN
u=GETENV('USERNAME') & h=GETENV('COMPUTERNAME')
ENDELSE
r=u+'@'+h
IF KEYWORD_SET(message) THEN $
IF STRLEN(u) EQ 0 OR STRLEN(h) EQ 0 THEN $
MESSAGE, 'not found', /INFO ELSE $
MESSAGE, r, /INFO
RETURN, r
END
[Message index]
 
Read Message
Read Message
Previous Topic: Theater Arts 101: Intro to Lighting Design
Next Topic: 3D Reconstructions of 2D Slices

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:13:11 PDT 2025

Total time taken to generate the page: 0.00701 seconds