sysenv and PM use the following to detect window NT
'hi lo'=. 256 256 #: > {. 'kernel32 GetVersion i' 15!:0 ''
IFWINNT=: (hi = 0) +. lo > 4
but for win95 this might be an error,
NB. * GetVersion (KERNEL32.@)
NB. + *
NB. + * Win31 0x80000a03
NB. + * Win95 0xc0000004
NB. + * Win98 0xc0000a04
NB. + * WinME 0xc0005a04
NB. + * NT351 0x04213303
NB. + * NT4 0x05650004
NB. + * Win2000 0x08930005
NB. + * WinXP 0x0a280105
The proper way as suggested in m$ webpage
http://msdn2.microsoft.com/en-us/library/ms724439.aspx
the highest bit is 0 for NT family.
'hw hi lo'=. 65536 256 256 #: > {. 'kernel32 GetVersion i' 15!:0 ''
IFWINNT=: hw < 32768
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm