#1 10 Sep 2018 05:51

be
New Member
Registered: 10 Sep 2018
Posts: 2

alpha greateer than numeric

I need to filter out certain values of numeric text that is in a .txt file,
and retain the narrative that is irregularly distributed throughout.
A few thousand lines numeric only;  maybe two dozen lines alpha only.

I traverse the file with FOR whose DO is an IF that does GEQ comparison
for filtering the numbers.
Problem is that the alpha always evaluates as true, i.e. GEQ any number.
I need it to fail instead.
Can you help?

Of course it works to test first all lines against an alpha value,
known not to exist in thousands of the lines,
in pursuit of the few alpha lines.
Probably offends your sensibilities as it does mine.

Offline

#2 10 Sep 2018 18:49

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 972
Website

Re: alpha greateer than numeric

if "abc" LSS 0 Echo we found a non numeric string

Offline

#3 10 Sep 2018 21:24

be
New Member
Registered: 10 Sep 2018
Posts: 2

Re: alpha greateer than numeric

Thanks.  I'm sure that I will use it someday for something.
Given that it does not avoid the double comparison,
what I did instead was to suffix the narrative lines with a number,
thus every line is processed in one comparison.

Offline

Board footer

Powered by FluxBB