Re: how to get os version?
Re: how to get os version?
- Subject: Re: how to get os version?
- From: Brennan <email@hidden>
- Date: Thu, 15 Nov 2001 23:15:18 +0100
Paul Berkowitz <email@hidden> wrote
>
I wasn't asking why 'version' isn't a real number - I was asking why
>
'version' wasn't a string or Unicode. Everything you mention above -
>
"Z1-1.4.3" is a regular character. Similarly versions of OS 8.5, even in the
>
US, which contained "A", "B", Rev", etc. are all strings, but not numbers.
>
Even "9.0.1" or "10.1.1" cannot be coerced as is to real numbers.
Yes, but (SomeVersionObject as real) is smart enough to ignore the second dot
So "1.4.3" becomes 1.43 whereas ("1.4.3" as real) causes an error. It needs to behave slightly differently to string or unicode, even if it's only coercion to number that makes it different.
Splitting hairs really, but I can certainly see the need for retaining the version class, and even using it more widely, so that all scriptable Apple applications have a version value in this class.
In fact, I'd like to be able to do stuff like
"2.4.5" as version
...or...
if SomeVersionObject > AnotherVersionObject then...
Wouldn't that be useful?
_____________
Brennan Young
Artist, Composer and Multimedia programmer
mailto:email@hidden
"History suggests very strongly that this revolution wont stop at 'a revolution in home entertainment' or a 'revolution in direct marketing.' Having tasted its power, there are bound to be people, outside the mainstream at present, who'll use the medium to promote much more radical agendas."
- Bob Hughes