[REBOL] Re: How to detect type of OS
From: anton:lexicon at: 3-Jul-2002 14:35
Hi Oldes,
system/version can tell you.
It looks like the platform is encoded into the
version tuple at positions four and (usually) five.
MS Windows is 3.1
If you go to
http://www.rebol.com/view-platforms.html
you can see:
Microsoft Windows (All) iX86 1.2.1.3.1 view-pro031.zip
So a test for windows platform could be:
"" = find/last/tail form system/version ".3.1"
or
all [system/version/4 = 3 system/version/5 = 1]
(but you have to be careful that there is a five element
in the tuple in that case.)
Anton