Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > modifying code-need some help

Reply
Thread Tools

modifying code-need some help

 
 
Joey Martin
Guest
Posts: n/a
 
      05-05-2004
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 (196 *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



 
Reply With Quote
 
 
 
 
Joey Martin
Guest
Posts: n/a
 
      05-05-2004
Nevermind....I figured it out once I read over what I wrote. It is the 5th
line.

Thanks
"Joey Martin" <(E-Mail Removed)> wrote in message
news:lBbmc.74308$(E-Mail Removed). ..
> 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 (196 *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
>
>
>



 
Reply With Quote
 
 
 
 
Phill. W
Guest
Posts: n/a
 
      05-06-2004
"Joey Martin" <(E-Mail Removed)> wrote in message
news:lBbmc.74308$(E-Mail Removed). ..
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP --- Modifying a instance of a specific element nad407 Java 0 01-18-2009 03:44 PM
[HELP] modifying hash Bil Kleb Ruby 4 09-21-2005 02:10 PM
Help needed in modifying a record rrohithr@gmail.com C++ 1 06-01-2005 05:52 PM
help traversing and modifying hash key and value inplace Trans Ruby 8 04-13-2005 02:52 PM
Modifying a cell on the datagrid control - Please help !!! bienwell ASP .Net 4 03-03-2005 08:49 PM



Advertisments