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

Clip line number

Expand Messages
  • abetsent
    Friends, As I suggested before, will be great to include a Clip code as $GetClipLineNumber$. With this command, will be very easy to do any Debug that you
    Message 1 of 5 , Jul 17, 2007
    • 0 Attachment
      Friends,

      As I suggested before, will be great to include a Clip code as
      $GetClipLineNumber$. With this command, will be very easy to do any
      Debug that you want, like to write a lot of variables at specific
      points of a Clip, .csv --> Excel, and even to create a kind of "flow-
      chart", etc. And that will be fine to analyze an execution.

      But before that, it is possible to do that if you use the SetDebug
      xxx.txt output, that is:

      ^!Set %clipe%=349
      Clip: "sr-criar-filenames"; Line: 236

      As you see, you have the Line number in the output.

      This is to the regex gurus: What will be the regex code to pickup this
      number? I know, will be easy, but I am not a regex guru.

      Thanks!
    • abetsent
      Sorry, I don t see that the second line is a .csv line: Clip: sr-criar-filenames ; Line: 236 Therefore, will be easy to pickup the line and read the second
      Message 2 of 5 , Jul 17, 2007
      • 0 Attachment
        Sorry, I don't see that the second line is a .csv line:

        Clip: "sr-criar-filenames"; Line: 236

        Therefore, will be easy to pickup the line and read the second
        field, etc. There exist a better way, like regex or other?

        Thanks!.


        --- In ntb-clips@yahoogroups.com, "abetsent" <backup2abet@...> wrote:
        >
        > Friends,
        >
        > As I suggested before, will be great to include a Clip code as
        > $GetClipLineNumber$. With this command, will be very easy to do
        any
        > Debug that you want, like to write a lot of variables at specific
        > points of a Clip, .csv --> Excel, and even to create a kind
        of "flow-
        > chart", etc. And that will be fine to analyze an execution.
        >
        > But before that, it is possible to do that if you use the SetDebug
        > xxx.txt output, that is:
        >
        > ^!Set %clipe%=349
        > Clip: "sr-criar-filenames"; Line: 236
        >
        > As you see, you have the Line number in the output.
        >
        > This is to the regex gurus: What will be the regex code to pickup
        this
        > number? I know, will be easy, but I am not a regex guru.
        >
        > Thanks!
        >
      • Sheri
        ... This will select the next such number, you can retrieve it ^$GetSelection$ if you want to do something with it. ^!Find (?i)^ ^ !Set .+ r n.+?Line: ( d+)$
        Message 3 of 5 , Jul 17, 2007
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "abetsent" <backup2abet@...> wrote:
          >
          > Friends,
          >
          > As I suggested before, will be great to include a Clip code as
          > $GetClipLineNumber$. With this command, will be very easy to do
          > any Debug that you want, like to write a lot of variables at
          > specific points of a Clip, .csv --> Excel, and even to create a
          > kind of "flow- chart", etc. And that will be fine to analyze an
          > execution.

          >
          > But before that, it is possible to do that if you use the SetDebug
          > xxx.txt output, that is:
          >
          > ^!Set %clipe%=349
          > Clip: "sr-criar-filenames"; Line: 236
          >
          > As you see, you have the Line number in the output. This is to
          > the regex gurus: What will be the regex code to pickup this
          > number? I know, will be easy, but I am not a regex guru. Thanks!
          >

          This will select the next such number, you can retrieve it
          ^$GetSelection$ if you want to do something with it.

          ^!Find "(?i)^\^\!Set .+\r\n.+?Line: (\d+)$" RS1

          Regards,
          Sheri
        • ebbtidalflats
          ... I havn t a clue, what you;re talking about. ... Line numbers for clip code are inconsistent. I have had the debug window report line numbers greater than
          Message 4 of 5 , Jul 18, 2007
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "abetsent" <backup2abet@...> wrote:
            >
            > Sorry, I don't see that the second line is a .csv line:
            >
            > Clip: "sr-criar-filenames"; Line: 236

            I havn't a clue, what you;re talking about.

            >
            > Therefore, will be easy to pickup the line and read the second
            > field, etc. There exist a better way, like regex or other?


            Line numbers for clip code are inconsistent.
            I have had the debug window report line numbers greater than the
            length of the clip. Perhaps this is fixed with ver 5.3, but I no
            longer bother testing this. Instead I use this work-around:

            1. I include error traps where I expect problems.
            These error traps include clipname, optional variable content.
            2. The error changes focus to the clipeditor,
            opens the clip,
            SEARCHES (plain search) for the error call,
            places cursor at that line.

            This method needs no line number.

            Example error trap:

            ;long line
            ^!If ^%test%<>^%desiredvalue% ^!Clip "ErrorTrap"
            ^$GetClipName$;args;to;error;handler
            ;end long line


            In the error handler:

            ^!SetListDelimiter ;
            ^!SetArray %args%=^&
            ;etc


            Cheers,


            Eb
          • frank
            hello all, ... remember to turn off Word Wrap when line numbers are important. regards, tf http://www.icosagame.com
            Message 5 of 5 , Jul 19, 2007
            • 0 Attachment
              hello all,

              >> ... Line numbers for clip code are inconsistent...

              remember to turn off Word Wrap when line numbers are important.

              regards,

              tf

              http://www.icosagame.com
            Your message has been successfully submitted and would be delivered to recipients shortly.