Eeek! I just re-read and realized I made a mistake, please see correct script below.

From re-reading, I think we are talking at cross purposes, this is an effort to make sure we are both on the same page here:

CR First Method.

To avoid appending an empty line to a "Lines container" (called myLineList from now on), each time a line is appended to the container, the following must be performed:

--
--  myNewLine contains the line to be appended
--
if myNewLine is not empty then
   if myLineList is empty then
      put myNewLine into myLineList
   else
      put return  & myNewLine after myLineList
   end if
end if

In this case you have to test that the CONTAINER is not empty, since if it is you will add a spurious empty line to the list. This is implicitly taken care of if you always use the CR last method which makes everyones life easier!

CR Last Method.

--
--  myNewLine contains the line to be appended
--
if myNewLine is not empty then
   put myNewLine & return after myLineList
end if

This is always assuming that it is illegal to have an empty line in the list, if it's not, then you just remove:

if myNewLine is not empty
end if

However, I was talking about an empty list CONTAINER not the item that was being appended, which is where I think the confusion has crept in. In the case which I first posted, it was impossible for a empty line to be appended since I was actually setting the value explicitly in the script.

Hope this clears up the misunderstanding.

Wouldn't you agree that the CR Last Method is simpler/easier/better?

All the Best
Dave



















All the Best
Dave
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to