Hostname: Difference between revisions
Content added Content deleted
(Adding MUMPS example) |
No edit summary |
||
Line 186: | Line 186: | ||
var hostname = network.computerName; |
var hostname = network.computerName; |
||
WScript.echo(hostname);</lang> |
WScript.echo(hostname);</lang> |
||
=={{header|Liberty BASIC}}== |
|||
<lang lb>lpBuffer$=Space$(128) + Chr$(0) |
|||
struct SIZE,sz As Long |
|||
SIZE.sz.struct=Len(lpBuffer$) |
|||
calldll #kernel32, "GetComputerNameA",lpBuffer$ as ptr, SIZE as struct, result as Long |
|||
nSize=SIZE.sz.struct |
|||
CurrentComputerName$=Trim$(Left$(lpBuffer$, SIZE.sz.struct)) |
|||
print CurrentComputerName$</lang> |
|||
=={{header|MATLAB}}== |
=={{header|MATLAB}}== |