modifying code-need some help

Discussion in 'ASP General' started by Joey Martin, May 5, 2004.

  1. Joey Martin

    Joey Martin Guest

    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(PedArray(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
    www.infosmiths.net
    502-633-3428
    Joey Martin, May 5, 2004
    #1
    1. Advertising

  2. Joey Martin

    Joey Martin Guest

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

    Thanks
    "Joey Martin" <> wrote in message
    news:lBbmc.74308$...
    > 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(PedArray(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
    > www.infosmiths.net
    > 502-633-3428
    >
    >
    >
    Joey Martin, May 5, 2004
    #2
    1. Advertising

  3. Joey Martin

    Phill. W Guest

    "Joey Martin" <> wrote in message
    news:lBbmc.74308$...
    > Can someone explain to me what this is doing?

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


    Split() /always/ returns a zero-based array, so you're actually
    looking at the *sixth* line, here, not the fifth.

    > What is the 52-21?


    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.
    Phill. W, May 6, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    678
    Guest
    Feb 25, 2004
  2. Holmes!
    Replies:
    2
    Views:
    430
    Malcolm Dew-Jones
    Apr 2, 2005
  3. =?Utf-8?B?Q2hyaXM=?=

    Help Help. I really need some help with this

    =?Utf-8?B?Q2hyaXM=?=, Jan 31, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    559
    =?Utf-8?B?SmFzb24gVmVybWlsbGlvbg==?=
    Jan 31, 2007
  4. Domino
    Replies:
    5
    Views:
    378
    dorayme
    Nov 5, 2006
  5. P2P
    Replies:
    2
    Views:
    157
Loading...

Share This Page