[comp.lang.c] Pass the Marmalade

bhoughto@pima.intel.com (Blair P. Houghton) (03/27/91)

In article <2052@necisa.ho.necisa.oz.au> boyd@necisa.ho.necisa.oz.au (Boyd Roberts) writes:
>In article <3418@inews.intel.com> bhoughto@nevin.intel.com (Blair P. Houghton) writes:
>>It still doesn't solve the problem of "sorting any data
>>type", since that problem is impossible to solve (I.e., you
>>have to know in advance the types that may be passed, which
>>necessarily omits those types you do not know and which
>>are, by the definition of the word "any", part of the set
>>"any data type").
>
>Damn right.
>So how are going to sort strudels?  Define the pastry comparison operator.

The real problem here is that you pass only a pointer to
the array of strudel, which means that qfat(3) can scribble
all over it in colored icing and slice off thick pieces for
itself.

>Which has precedence?  Sweet or savory?

Call for votes:  comp.std.c.baking
    This group will be for the purpose of deciding
    where to go _after_ lunch each day.

    Moderated? If we did moderated, would we *be*
    this portly? Hmm?

>Is there a native comparison operator that I can use with a #pragma?

I believe ANSI X3.159-1989 handles the problem of
pectin when it deals with implicit fruit-casting
in frosting calls with or without a frosting prototype
in scope.

Something about the "default rum-raisin promotions."

Drat.  I left my copy of the Standard on the other
corner of my desk.  Anyone know the answer?

>Remember:  Strudels are tricky.

Sticky!  You have to Set the Sticky bit so as not to sort
the Same Strudel twice; this forces all Strudel Sorts to
become Single-pass Strudel Sorts.

Oh, but I forget, the Sticky bit is patented, and that's UNIX(TM).
(Followups to comp.unix.MrsFields.internals).

Seems like the Standard should have dealt with Sticky _buns_.

What does POSIX have to say about this?

				--Blair
				  "Replies via flaky crust only, please."

mcdaniel@adi.com (Tim McDaniel) (03/30/91)

In article <3493@inews.intel.com> bhoughto@pima.intel.com (Blair P.
Houghton) writes:

   The real problem here is that you pass only a pointer to
   the array of strudel, which means that qfat(3) can scribble
   all over it in colored icing and slice off thick pieces for
   itself.

... because passing a *pointer to an array* of strudel is almost
certainly NOT what you want.  Simply pass the address of the zeroth
strudel, and qfat() will munch down each one in turn.  In C, you can
just use the name of the array of strudel, because of

                           *** THE RULE ***

"In an eat-value context, a <strudel> is converted to <pointer to, fat
cell>.  Any use of a strudel is an eat-value context, except for
* declaring a strudel
* initializing a strudel
* determining the size of a strudel"

And what *do* you get when you add two strudel?  If you get a strudel
with twice the size, I guarantee you'll get overflow and a core dump.

--
   "Of course he has a knife.  We all have knives.  It's 1183, and we're
   all barbarians."
Tim McDaniel                 Applied Dynamics Int'l.; Ann Arbor, Michigan, USA
Internet: mcdaniel@adi.com                UUCP: {uunet,sharkey}!amara!mcdaniel

silver@xrtll.uucp (Hi Ho Silver) (04/01/91)

In talk.bizarre, mcdaniel@adi.com (Tim McDaniel) typed:
$And what *do* you get when you add two strudel?  If you get a strudel
$with twice the size, I guarantee you'll get overflow and a core dump.

   Not only that, it's a core dump that will plug up your exit() when
you try to void.
-- 
.--------------------------------------.nexus.yorku.edu!xrtll!silver
|Silver, perpetually searching for SNTF|----------------------------
`--------------------------------------'this space for rent to grils