Returns the string value assigned to a system environment variable
(getenv variable-name)
Arguments
variable-name
A string specifying the name of the variable to be read. Environment variable names must be spelled and cased exactly as they are stored in the system registry.
Return Values
A string representing the value assigned to the specified system variable. If the variable does not exist, getenv returns nil.
Examples
Assume the system environment variable ACAD is set to /acad/support and there is no variable named NOSUCH.
Command: (getenv "ACAD")
"/acad/support"
Command: (getenv "NOSUCH")
nil
Assume that the MaxArray environment variable is set to 10000:
Command: (getenv "MaxArray")
"10000"
System
|
系统相关
|
(getenv "ComputerName")
|
字符串-计算机名
|
(getenv "COMSPEC")
|
字符串-Cmd.exe路径
|
(getenv "MaxArray")
|
整数-最大排列
|
(getenv "OS")
|
字符串-操作系统
|
(getenv "Path")
|
字符串-系统搜索路径
|
(getenv "Pathext")
|
字符串-执行语句扩展名
|
(getenv "SystemDrive")
|
字符串-系统驱动器
|
(getenv "SystemRoot")
|
字符串-系统根路径
|
(getenv "Temp")
|
字符串-临时路径
|
(getenv "TMP")
|
字符串-临时路径
|
(getenv "UserName")
|
字符串-用户登录名称
|
(getenv "UserProfile")
|
字符串-当前用户配置文件路径
|
(getenv "Windir")
|
字符串-Windows路径
|
posted on 2008-03-18 17:29
深藏记忆 阅读(223)
评论(0) 编辑 收藏 所属分类:
Vlisp之韵