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

[Clip] Re: Making numbers line up

Expand Messages
  • wheeler54321@yahoo.com
    Hi Stephen! I tested your clip, it does the job. But the output looks a little ... Line1: 234 Line2: 5678 Line3: 9101112 Line4: 1234 ... Line1:
    Message 1 of 7 , Apr 2, 2001
      Hi Stephen!

      I tested your clip, it does the job. But the output looks a little
      different with extra space. For Instance:

      -----------Original
      Line1: 234
      Line2: 5678
      Line3: 9101112
      Line4: 1234
      -------------------

      ----------Output

      Line1: 234
      Line2: 5678
      Line3: 9101112
      Line4: 1234
      -------------------

      Is there something I overlooked?

      To anybody who is interested-
      When fixing long lines:

      > ^!Append %output%=^%NL%^$StrInsert("^$StrFill("
      > ";^%add%)$";"^%text^%counter%%";^%where%)$

      Note the space between " "
      ...^$StrInsert("^$StrFill(" ";^%add%)$";"^%text....

      wheeler
    • Stephen
      Hi Wheeler, I just don t know why it does that, but I noticed that every one of the clips except yours have little oddities. (Sigh). I ll look at it and
      Message 2 of 7 , Apr 2, 2001
        Hi Wheeler,
        I just don't know why it does that, but I noticed that every one of the
        clips except yours have little oddities. (Sigh). I'll look at it and
        figure out exactly what is the problem. Probably where the clip decides
        how many spaces to add on each line. If it were in the section where the
        clip figures out how long the lines should be then there should be
        either more variation or similiar string length for all line.
        Thanks,
        Stephen

        wheeler54321@... wrote:
        >
        > Hi Stephen!
        >
        > I tested your clip, it does the job. But the output looks a little
        > different with extra space.
        . . .
      • Stephen
        Hi Wheeler, Figured it out, The problem is that I was using ; as a list delimiter which added an extra space to every line but the first one. Line 27 should
        Message 3 of 7 , Apr 2, 2001
          Hi Wheeler,
          Figured it out,
          The problem is that I was using "; " as a list delimiter which added an
          extra space to every line but the first one.
          Line 27 should be:
          ^!Set %text%="^$StrReplace("^%NL%";";";^%text%;FALSE;FALSE)$"
          instead of
          ^!Set %text%="^$StrReplace("^%NL%";"; ";^%text%;FALSE;FALSE)$"

          Also, if the clip were thorough, it would somewhere add a routine to
          keep semicolons somewhere in the text from screwing up the format.
          Later,
          Stephen

          wheeler54321@... wrote:
          >
          > Hi Stephen!
          >
          > I tested your clip, it does the job. But the output looks a little
          > different with extra space. For Instance:
        • wheeler54321@yahoo.com
          Hi Stephen! ... Sweet! I will have to use your clip as a sample for some upcoming projects. Good Job! wheeler
          Message 4 of 7 , Apr 2, 2001
            Hi Stephen!
            > Figured it out,

            Sweet! I will have to use your clip as a sample for some upcoming
            projects.

            Good Job!

            wheeler
          • Stephen
            Flattery? Thanks
            Message 5 of 7 , Apr 3, 2001
              Flattery?
              Thanks

              wheeler54321@... wrote:
              > I will have to use your clip as a sample for some upcoming
              > projects.
              >
              > Good Job!
              >
              > wheeler
              >
            • thefrank
              Hi Stephen , I tested your clip using same file as other tests. 1000 lines formatted in 25 seconds! Nice job. Using String methods certainly handles some of
              Message 6 of 7 , Apr 3, 2001
                Hi Stephen ,

                I tested your clip using same file as other tests. 1000 lines
                formatted in 25 seconds! Nice job. Using String methods certainly
                handles some of the quirks inherent in other methods (after all, they
                are strings...) but is is strange to watch the cursor just sit there
                while the statusbar does all the work. (ahem..)

                I did have several newlines after the last text which did get counted
                in the final result, so if an accurate count is needed I suppose they
                will need to be trimmed.

                The only plausible argument (that I can think of) for presetting the
                RightMargin is if large batches of similar data needs to be formatted
                consistently over several sets, the longest line in one set may not
                be the same as another, or from batch to batch.

                Presetting the right limit would keep the output consistent over the
                long haul and improve readability, especially if the output pages are
                bound, or otherwise collated.

                All in all, itsa nice clip that works fine, and I learned some string
                stuff too.

                Regards,

                tf
              Your message has been successfully submitted and would be delivered to recipients shortly.