Path: utzoo!attcan!uunet!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: SysEnvirons and systemVersion Message-ID: <2873@carthage.cs.swarthmore.edu> Date: 12 May 89 14:10:59 GMT References: <5692@microsoft.UUCP> Reply-To: jackiw@carthage.UUCP (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 45 In article <5692@microsoft.UUCP> stuartb@microsoft.UUCP (Stuart Burden) writes: > I have a quick question to do with the SysEnvirons function and how to > interpret the system version from it. > > For example, systemVersion returns 1538 when run on a release 6.0.2. Do I > then have to manually say, well since it's 1538 it must be 6.0.2? If so > where is there a list of previous "system numbers". > 1538 in hexadecimal is ... $0602! So, if your compiler won't let you check whether theRec.systemVersion >= $0600 (i. e. running System 6 or later), you can explicitly break it up into System Major Release = sysVers div 256; Minor Release = sysVers mod 256. > As an aside to this, how does one determine the finder version also? Ouch. Well, you could use SysEnvirons to find the System Folder, and then look for "Finder" in there, open it up, and checks it 'vers' resources. There's no guarantee that future or ancient finders will maintain a vers resource at all, or even that User definitely has a finder (instead of some f-substitute), etc., so you should prepare a default action. Out of curiosity why do you need to know the version? Possibly there's information outside the SysEnvRec your application will depend on? In the words of Apple, "Impossible! No such thing!" (1/2 :-)) -Nick. > Stu. > __Paths to my door:_______________________ > microsoft!stuartb@beaver.cs.washington.edu - Usual disclaimer, that all > microsoft!stuartb@uw-beaver.arpa - the above is pure fantasy > microsoft!stuartb@uunet.UU.NET - and Microsoft only > [DE01HB]stuartb@DASNET# {from AppleLink} - gave me the Mountain Dew > stuartb@microsoft.uucp {well connected} - to dream it all in a > D2012 {@applelink.apple.com - shared acct} - caffeine haze :-) > __________________________________________________________________________ -- _ _|\____ Nick Jackiw | Visual Geometry Project | Math Department / /_/ O> \ ------------+-------------------------+ Swarthmore College | O> | 215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081 \_Guernica_/ ------------+-------------------------+ USA