olliwest
16th May 2008, 11:08
hi together,

i like to check the OS type with the function os_type:


long ret

function main()
{

ret = ostype()
message("--"&str$(ret)&"--")
}


then i get the result 1
now means 1 = windows or??

and when i have a linux/unix os then i get another result??

thanks olli

zardoz
16th May 2008, 11:15
you have to test the following constants:

OS_WINDOWS_NT
OS_WINDOWS_95
OS_UNIX
OS_OS400



ret = ostype()
on case ret
case OS_WINDOWS_NT:
str = "WINDOWS/NT"
break
case OS_WINDOWS_95:
str = "WINDOWS 95"
break
case OS_UNIX:
str = "UNIX"
break
case OS_OS400:
str = "AS 400"
break
endcase
message(str)