[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Reverse lines in a file?



Robert,

This looks good. I actually wrote my own XPL program once to reverse sort
lines, but it didn't work on this job. I'll have to examine your program,
and see why it works when mine doesn't.

Thanks to everybody for your suggestions.

Norman


At 08:04 PM 6/30/04 -0400, Robert Holmgren wrote:
>
>
>** Reply to message from Patricia M Godfrey  on Tue,
29 Jun
>2004 21:12:02 -0400
>
>Here's a routine to Reverse Sort any block of text.
>It presumes that the block of text is already sorted
>in the order (alpha, numeric, whatever) which you wish
>to reverse. Rules:
>
> The Sort Block must be DeFined when you launch the program
> All lines-to-sort must terminate with a carriage return
> A recent U2 must be installed
>
>The routine is "attached", and also XPLeNCODEd below. RUN it.
>It will be part of the next U2, as routine "revsort".
>
>XPLeNCODE v2.0
>b-gin [UNTITLED]
>;*; Reverse Sort DeFined Block R.J.Holmgren 6/30/04[cr|lf];*
>;[cr|lf];*; Rules:[cr|lf];*;  Sort Block must be DeFined[cr|
>lf];*;  All lines must terminate with a carriage return[cr|l
>f];*;  Recent U2 must be installed[cr|lf];*;[cr|lf]{<}IF{<}V
>A$DF{>}>0{>}{<}SX01,{<}VA$DT{>}{>}[XP_][DZ_][DE_][CL_]{<}IF{<
>}VA$RS{>}{240}"{027}"{>}{<}SX02,{<}VA$DN{>}{>}{<}SX03,{<}VA$D
>S{>}{>}{<}SX04,{<}PV03{>}{>}{<}SX05,{<}PV02{>}-{<}PV03{>}{>}[
>DB_][XD_]{<}SX06,0{>}{<}LBA{>}[BX_]se [cr|lf][Q2_]{<}IF{<}CP
>{>}<={<}PV02{>}{>}{<}SX06,{<}PV06{>}+1{>}{<}IF{<}CP{>}<{<}PV0
>2{>}{>}{<}GLA{>}{<}EI{>}{<}IF{<}PV06{>}>0{>}{<}SX07,1{>}{<}SX
>50,{<}PV02{>}{>}[JM_]2.ReJuMP[Q2_][CL_]{<}LBB{>}{<}IF{<}PV07{
>>}<{<}PV06{>}{>}[DP_]{<}SV08{>}[DN_]{<}SX09,{<}VA|08{>}{>}{<}
>SX50,{<}PV03{>}{>}[JM_]2.ReJuMP[Q2_]{<}GT08{>}{<}SX50,{<}PV02
>{>}-1{>}[JM_]2.ReJuMP[Q2_]{<}SX03,{<}PV03{>}+{<}PV09{>}{>}{<}
>SX07,{<}PV07{>}+1{>}{<}GLB{>}{<}EI{>}{<}SX50,{<}PV04{>}{>}[JM
>_]2.ReJuMP[Q2_]{<}SX50,{<}PV01{>}{>}[JM_]2.setDT[Q2_]{<}PRDon
>e{>}{<}EX{>}{<}EI{>}{<}EI{>}{<}EI{>}{<}PRSort list does not t
>erminate with carriage return - Abort{>}{<}EX{>}{<}EI{>}{<}PR
>No DeFined block to Reverse Sort!{>}{<}EX{>}[cr|lf][cr|lf]
>-nd
>XPLeNCODE
>
>-----------------------------
>Robert Holmgren
>holmgren@xxxxxxxx
>-----------------------------
>
>
>Attachment Converted: "C:\eudora\ATTACH\REVSORT.PM"
>
-------------------------------------------------------
Norman Bauman
411 W. 54 St. Apt. 2D
New York, NY 10019
(212) 977-3223
http://www.nasw.org/users/nbauman
Alternate address: nbauman@xxxxxxxx
-------------------------------------------------------