473,508 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(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

Jul 19 '05 #1
2 1281
Nevermind....I figured it out once I read over what I wrote. It is the 5th
line.

Thanks
"Joey Martin" <ma******@bellsouth.net> wrote in message
news:lB*******************@bignews6.bellsouth.net. ..
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

Jul 19 '05 #2
"Joey Martin" <ma******@bellsouth.net> wrote in message
news:lB*******************@bignews6.bellsouth.net. ..
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.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
8095
by: Japcuh | last post by:
How do you write self modifying code in Java? Japcuh (Just Another Perl C Unix Hacker) http://www.catb.org/~esr/faq/hacker-howto.htm#what_is ..0. ...0 000
6
8299
by: qwweeeit | last post by:
Hi all, when I was young I programmed in an interpreted language that allowed to modify itself. Also Python can (writing and running a module, in-line): fNew =open("newModule.py",'w') lNew=...
12
2176
by: pvinodhkumar | last post by:
1) char* p = "Plato"; p = 'r'; // runtime error 2) char c = "Plato"; c = 'i';// ok.Why no runtime here?Why is the contradiction? cout << c << endl;
3
4994
by: Martin | last post by:
I'm trying to paint my own caption bar/title bar and also my own frame border, but I'm having problems with modifying the clip region so windows doesn't paint over my stuff when I call base.WndProc...
2
2396
by: Yavuz Bogazci | last post by:
Hi, i am reading the LastAccessTime, LastWriteTime and DateofCreation of a file. The second and third are working well, but each time i want to read the LastAccessTime, its set to "now". How can...
6
1542
by: MackS | last post by:
Hello everyone I am faced with the following problem. For the first time I've asked myself "might this actually be easier to code in C rather than in python?", and I am not looking at device...
1
3064
by: A.M-SG | last post by:
Hi, Can I view/modify SOAP message at the client proxy side without using soap extensions? Thank you,
13
2105
by: Robin Becker | last post by:
When young I was warned repeatedly by more knowledgeable folk that self modifying code was dangerous. Is the following idiom dangerous or unpythonic? def func(a): global func, data data =...
56
4403
by: subramanian100in | last post by:
The standard allows that we can copy strings onto arg, arg, etc. Why is it allowed ? What can be the maximum length of such a string that is copied ?
6
3860
by: Arnshea | last post by:
(apologies for the crosspost) I'm working with an MFC based COM object. From C# I'd like to be able to call a method on the COM object that takes a string array and modifies the contents. Is...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.