How to tell Type of CPU?????

Scott Morrow scott at elementarysoftware.com
Wed May 2 07:30:18 EDT 2007


Dave,
< the platform > correctly returns MacOS for all Macintosh systems.   
To distinguish them use < the systemVersion >

-- this function (taken from the stdLib) lets you know if it is OSX
function isOSX
   if the platform is not "MacOS" then return false
   get the systemversion
   set the itemdel to "."
   if item 1 of it >= 10 then return true
   return false
end isOSX


--  if it is OSX then you can check to see if < the processor >  
contains "PowerPC"
if isOSX() then
    if   "PowerPC" is in the processor then
      put "PPC"
    else
      put "Intel"
    end if
end if


-Scott Morrow

Elementary Software
(Now with 20% less chalk dust !)
web     http://elementarysoftware.com/
email   scott at elementarysoftware.com

-----------------------------------------------------------------

On May 2, 2007, at 3:52 AM, Dave wrote:

> Hi,
>
> How can I tell the type of machine the stack is running on?
>
> I've tried "the machine" - this returns "unknown".
>
> the "platform" returns "MacOS" - (incorrectly since I'm actually  
> running under "MacOS X"
>
> I need to tell if:
>
> 1.  I'm Running Under Mac OS X or Windows and
> 2.  If Mac OS X, if I'm running on an Intel or PowerPC
>
> Thanks a lot
> All the Best
> Dave
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list