modifying code-need some help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joey Martin

    modifying code-need some help

    I am modifying someone else's code and need help with an array:

    Can someone explain to me what this is doing?

    PedArray = Split(T_ped,CHR (13))
    I know this is creating an array and splitting the t_ped text at the
    CHR(13).

    What is this next step?
    Sire_1 = Trim(mid(PedArr ay(5),21,52-21))
    Is that "Look at the 5th split", starting at character 21? What is the
    52-21?

    If t_ped =*Nasrullah 40 Bold Ruler 54 Boldnesian 63 Miss Disco 44 Polynesian
    42 Alanesian 54 Bold Reasoning Alablue 45 (1968) *Turn-To 51 Hail To Reason
    58

    Sire 1 is being displayed as Alanesian5

    IS that correct?



    --
    Joey Martin, President
    Infosmiths

    502-633-3428



  • Joey Martin

    #2
    Re: modifying code-need some help

    Nevermind....I figured it out once I read over what I wrote. It is the 5th
    line.

    Thanks
    "Joey Martin" <mart3939@bells outh.net> wrote in message
    news:lBbmc.7430 8$7a5.72922@big news6.bellsouth .net...[color=blue]
    > I am modifying someone else's code and need help with an array:
    >
    > Can someone explain to me what this is doing?
    >
    > PedArray = Split(T_ped,CHR (13))
    > I know this is creating an array and splitting the t_ped text at the
    > CHR(13).
    >
    > What is this next step?
    > Sire_1 = Trim(mid(PedArr ay(5),21,52-21))
    > Is that "Look at the 5th split", starting at character 21? What is the
    > 52-21?
    >
    > If t_ped =*Nasrullah 40 Bold Ruler 54 Boldnesian 63 Miss Disco 44[/color]
    Polynesian[color=blue]
    > 42 Alanesian 54 Bold Reasoning Alablue 45 (1968) *Turn-To 51 Hail To[/color]
    Reason[color=blue]
    > 58
    >
    > Sire 1 is being displayed as Alanesian5
    >
    > IS that correct?
    >
    >
    >
    > --
    > Joey Martin, President
    > Infosmiths
    > www.infosmiths.net
    > 502-633-3428
    >
    >
    >[/color]


    Comment

    • Phill.  W

      #3
      Re: modifying code-need some help

      "Joey Martin" <mart3939@bells outh.net> wrote in message
      news:lBbmc.7430 8$7a5.72922@big news6.bellsouth .net...[color=blue]
      > Can someone explain to me what this is doing?[/color]
      .. . .[color=blue]
      > What is this next step?
      > Sire_1 = Trim(mid(PedArr ay(5),21,52-21))
      > Is that "Look at the 5th split", starting at character 21?[/color]

      Split() /always/ returns a zero-based array, so you're actually
      looking at the *sixth* line, here, not the fifth.
      [color=blue]
      > What is the 52-21?[/color]

      Believe it or not, it's simply the value 31.
      Possibly left by the original Developer to show a relationship
      between, say, the "record" size and the position of this particular
      "field".

      HTH,
      Phill W.


      Comment

      Working...