Restrict to lines filter - confusing terminology in help

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
DFH
Posts: 805
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Restrict to lines filter - confusing terminology in help

Post by DFH » Wed Feb 21, 2018 1:49 am

Hi Simon,

The Restrict to lines filter help page includes:
Specification

The lines can be specified in a number of ways. See Field specifications.

You can separate line numbers with spaces or commas, and ranges with ..

1. Start line, end line. This processes all lines including and between the specified lines. e.g. 1..7

2. Start line, width. Processes lines starting from (and including) line Start. e.g. 10 .. +3 processes 3 lines starting from line 10.

3. End line, width. Processes Width lines backwards starting from (and including) line End. e.g. -4 .. +3 processes 3 lines starting from 4 lines before the end of the line.

4. Start line to end of line. Processes all lines from the Start line to the very end of the line. e.g 5 .. -2 processes lines starting from line 5, and stopping 2 lines from the end of the line.

5. Width to end of line. Processes Width lines backwards starting from (and including) the last line e.g. -10 .. +2 processes 2 lines starting from the line 10 before the end of the line.

This filter only allows a single range to be specified.
IMHO, the terminology is confusing in your use of "to end of [the] line" when you really mean "to end of [the] file" or merely "end line".

Aside: It was much easier to program the older UI for this filter. The UI change was not an improvement.

Please review the help text for this and similar filters that use a line range.

Best regards,

David

PS
Processes Width lines backwards
is also confusing, as TextPipe does not process these lines in reverse order.
Last edited by DFH on Wed Feb 21, 2018 2:15 am, edited 1 time in total.

DFH
Posts: 805
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Restrict to lines filter - confusing terminology in help

Post by DFH » Wed Feb 21, 2018 2:06 am

One of my very old filters (made with the original UI) contains the subfilter that now displays as:

Code: Select all

Restrict to lines: 2 .. -1
As my original intention was merely to exclude line 1, it's hard to understand why TextPipe v10.0 converted the sub-filter data to show the end line: -1

As I read the Help page, despite its confusing terminology, this seems to imply that it should stop processing 1 line before the end of the file.

Yet there was never any design in my original filter to exclude the last line of the file. It was always to be included.

This example illustrates why the help page is so confusing.

David

DFH
Posts: 805
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Restrict to lines filter - confusing terminology in help

Post by DFH » Wed Feb 21, 2018 2:12 am

Consider for illustration purposes an input file containing only 10 lines.

AFAICT, TextPipe field specifications UI numbers these lines as follows:

Code: Select all

Start	End
1	-10
2	-9
3	-8
4	-7
5	-6
6	-5
7	-4
8	-3
9	-2
10	-1
OK ?

Which lines (if any) would be processed under Restrict to lines: 6 .. -6 as the data for this filter ?

David

User avatar
DataMystic Support
Site Admin
Posts: 2280
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Restrict to lines filter - confusing terminology in help

Post by DataMystic Support » Thu Apr 26, 2018 10:21 pm

None -as starting from line 6, and ending from line 4, there are no lines that meet this criteria unless the file has 12 or more lines.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 805
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Restrict to lines filter - confusing terminology in help

Post by DFH » Sun Apr 29, 2018 2:40 am

Simon,

Please also answer the points in the previous comments.

I still don't get how

Code: Select all

-1
appeared in

Code: Select all

2..-1
.

David

Post Reply