Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Re: End of File Test

Expand Messages
  • Art Kocsis
    Thanks Michael, It s almost what I was looking for. I guess I didn t make myself totally clear in my request but you picked up on it anyway. I was looking for
    Message 1 of 6 , Sep 29, 2008
    • 0 Attachment
      Thanks Michael,

      It's almost what I was looking for. I guess I didn't make myself totally
      clear in my request but you picked up on it anyway. I was looking for a
      simple command for an EOF test, not a clip, as it would be used in a loop
      to append a new line to the document if the cursor was at the EOF. It is
      such a standard test that thought it existed in Notetab and I just couldn't
      find it.

      However, you gave me the clue that I needed. Looking up ^$GetParaCount$ I
      found the ^$GetLineCount$ command which avoids the word wrap issue. So the
      EOF conditional becomes:

      ^!Set %EOF%=^$GetRow$ >= ^$GetLineCount$

      Hmmm. Well, it would be if logical expressions were allowed. (Note, even
      though the current row should never be greater than the total line count
      years of debugging taught me to be very cautious in testing for equality,
      hence the ">=" rather than "=".)

      However, restating it as conditional test:

      ^!If ^$GetRow$ < ^$GetLineCount$ NotEOF_Label EOF_Label

      is almost as good as a direct EOF test. And, in looking back, almost
      identical to what you suggested (except for the change of function)

      So thanks again for the tip. Sorry I didn't respond earlier - I got waylaid
      by other projects and couldn't get back to this until now.

      Namaste', Art

      At 9/24/2008 05:58 PM, you wrote:
      >I had this saved in my Notetab libraries folder. If the current row
      >(line) number equals the total number of paragraphs (lines), then you
      >are at the end of file. There are a few prompts to tell you where you
      >are but they can be deleted.
      >
      >Yours, Michael F
      >=======
      >^!Info you are on line ^$GetRow$
      >^!If ^$GetRow$=^$GetParaCount$ lastrow Else end
      >
      >:lastrow
      >^!Info this is the end of file
      >^!Goto Exit
      >
      >:End
      >^!Info this is not the last line
    Your message has been successfully submitted and would be delivered to recipients shortly.