Hostname: Difference between revisions
Content added Content deleted
No edit summary |
(-> IDL) |
||
Line 3: | Line 3: | ||
Find the name of the host on which the routine is running. |
Find the name of the host on which the routine is running. |
||
==[[IDL]]== |
|||
[[Category:IDL]] |
|||
hostname = GETENV('computername') |
|||
==[[Tcl]]== |
==[[Tcl]]== |
Revision as of 06:09, 3 February 2007
Hostname
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
Find the name of the host on which the routine is running.
IDL
hostname = GETENV('computername')
Tcl
The basic introspection tool in TCL is the info command. It can be used to find out about the version of the current Tcl or Tk, the available commands and libraries, variables, functions, the level of recursive interpreter invocation, and, amongst a myriad other things, the name of the current machine:
set hname [info hostname]