Reverse a list
J. Landman Gay
jacque at hyperactivesw.com
Thu Feb 12 14:04:05 EST 2015
On 2/12/2015 12:54 PM, Peter Haworth wrote:
>> Lets say for example you had
>> >a list of 10,000 customers and their email addresses. Most customers do
>> >have an email, a few don't and it just so happens that your first customer
>> >Aardvark, and last customer, Zoe, don't have email. If you read just the
>> >emails into an LC variable the first line will be blank and you'll have
>> >9999 lines. If you use the LC provided functions thus far presented to
>> >reverse the data, you'll end up with the first line not being blank, and
>> >9998 lines.
>> >
> I haven't run any of the LC scripts to do this but if that's true, then
> they don't achieve the original objective of reversing the list.
I don't think it's true. Using LC scripts, the first and last lines will
be terminated by a CR and the line count won't change. The first and
last lines will have no values but are still terminated by a CR, which
is what determines the count.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list