Article View: comp.sys.powerpc
Article #3122Re: Debate: PowerMac "trounces" Pentium....???
From: Edmund R. Zavada
Date: Thu, 08 Feb 1996 15:18
Date: Thu, 08 Feb 1996 15:18
43 lines
3174 bytes
3174 bytes
In article <davis-0602961925510001@pppsb15.itg.ti.com>,
davis@adrs1.dseg.ti.com (Tom L. Davis) wrote:
>In article <9602051257.AA29046@dxmint.cern.ch>, Dan Pop
><danpop@mail.cern.ch> wrote:
>
> A scientist or engineer who wants to run his programs, developed on other
> systems, on his Mac, via a simple compilation (they were written in
> portable C, after all) is in the situation of not being able to use the Mac
> for any other purposes. Or to learn the misteries of MacOS, on which he
> doesn't have any interest, because he's not a Mac programmer, he's only a
> Mac user.
>
>Others have posted that at least some Mac compilers will automatically
>insert calls to the event loop. However, you are right: this is the major
>(and perhaps only) draw back to CMT vs. PMT. And, as stated earlier, this
>impacts the programmer, not the user.
Often a simpler way is to use the built-in C Console available in both
Symantec and Metrowerks C/C++. Your first call to printf(), cout, etc..
initializes the MacOS and displays a console window. Every call to a
console function also automatically calls WaitNextEvent() so the programs
do cooperative multitasking by default.
If the code uses long calculations that don't display results, additional
calls to WaitNextEvent(nullEvent, sleeptime, &myIgnoredEvent, NULL);
placed inside the main loop will allow it to be very well behaved.
Admittedly, addition of these extra calls is not "a simple compile". But
it is trivial compared to the complexity of most programs. Considering how
poorly many UNIX compilers implement ANSI standards (IMHO), going from one
UNIX C compiler to another can be more work. ( I've seldom found "portable
C code" to be really portable -- until it's actually been ported at least
once. :-) )
---------------------------------------------------------------------
Ed Zavada Radford University
ezavada@runet.edu Environmental Geography
http://www.cs.runet.edu/~ezavada/ & Computer Science
---------------------------------------------------------------------
"An eye for an eye leaves the whole world blind." - M. Gandhi
---------------------------------------------------------------------
Technical Details
Message-ID:
<ezavada-0802961024220001@10.0.2.15>Path:
arc1-ca.pugleaf.net!newslink.runet.edu!NewsWatcher!userReferences:
<4csn1n$klb@macshack.com> <DKxzFK.2r6@eskimo.com> <4d3m6o$bb6@macshack.com> <4d428mINNe14@anaconda.cis.ohio-state.edu> <4d9ui4$e63@macshack.com> <david-1401960302090001@s245_7.resnet.ucla.edu> <1996Jan26.192156@eigb> <jragosta-2601961539320001 <19960201.11A2980.E21F@olympus.net> <kjfair-0502960034100001@ngrh-34.rh.uchicago.edu> <9602051257.AA29046@dxmint.cern.ch> <davis-0602961925510001@pppsb15.itg.ti.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newslink.runet.edu!NewsWatcher!user From: ezavada@runet.edu (Edmund R. Zavada) Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel Subject: Re: Debate: PowerMac "trounces" Pentium....??? Date: 8 Feb 1996 15:18:31 GMT Organization: Radford University Message-ID: <ezavada-0802961024220001@10.0.2.15> References: <4csn1n$klb@macshack.com> <DKxzFK.2r6@eskimo.com> <4d3m6o$bb6@macshack.com> <4d428mINNe14@anaconda.cis.ohio-state.edu> <4d9ui4$e63@macshack.com> <david-1401960302090001@s245_7.resnet.ucla.edu> <1996Jan26.192156@eigb> <jragosta-2601961539320001 <19960201.11A2980.E21F@olympus.net> <kjfair-0502960034100001@ngrh-34.rh.uchicago.edu> <9602051257.AA29046@dxmint.cern.ch> <davis-0602961925510001@pppsb15.itg.ti.com> NNTP-Posting-Host: rucs2-gw.runet.edu