Re: how to get os version?
Re: how to get os version?
- Subject: Re: how to get os version?
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 15 Nov 2001 12:14:30 -0800
On 11/15/01 11:52 AM, "Brennan" <email@hidden> wrote:
>
Paul Berkowitz <email@hidden> wrote
>
>
> Does anyone know what sort of data type 'version' is, and why there is such
>
> a beast?
>
>
It may not make sense to US users, but for those of us running non-us systems,
>
there's a very good reason for version to be a datatype. On my international
>
english system (applescript's version) returns "Z1-1.4.3". ('Z1-' is a prefix
>
used in version strings throughout the international English MacOS). Other
>
language systems have their own prefices, for example Denmark is 'DK-'. This
>
means that you should not assume that (version as string) will be comprised
>
solely of numerical characters and periods (or 'full stops' for international
>
English readers).
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.
I was just wondering why they couldn't be strings, or - as is now the case -
Unicode text, which allows all sorts of non-ASCII characters. perhaps that's
the reason: until OS 9.1 (I think) even 'Unicode text' was in raw data form
only, and before OS 8.5 didn't exist in AppleScript. So perhaps 'version'
was needed to deal with non-ASSCII characters that might be used in other
countries - for non-Apple software at least. Now, with proper Unicode in
AppleScript, a separate data type is not needed ever.
--
Paul Berkowitz