pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: procedures and sorting


From: Ben Pfaff
Subject: Re: procedures and sorting
Date: Thu, 27 Jul 2006 07:59:55 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> On Sun, Jun 18, 2006 at 07:22:03PM -0700, Ben Pfaff wrote:
>
>      SORT is kind of a special case.  If you just want to sort a
>      casefile, you can use the sort_execute() function.  Pass it a
>      casereader and some criteria and it'll return a new casefile that
>      contains the same data sorted according to those criteria.
>      
> Is there a good reason why sort is a special case ?
> Could it not be implemented as a procedure like any other ?

Sorting is an operation that lots of code wants to do, so it is
separated into a library of its own.  SORT CASES is just one of
the clients of the sorting code.  The sorting library allows it
to boil down to just a bit of parsing followed by a single call
to sort_active_file_in_place.

I imagine that other procedures will want to broken apart this
way too.  At least, you'll have the choice of either doing that
or causing the GUI to emit SPSS syntax that the procedures then
consume.  I don't know which is the better choice.
-- 
"In the PARTIES partition there is a small section called the BEER.
 Prior to turning control over to the PARTIES partition,
 the BIOS must measure the BEER area into PCR[5]."
--TCPA PC Specific Implementation Specification




reply via email to

[Prev in Thread] Current Thread [Next in Thread]