Hi guys,
I need ur help.
If I have character strings (data array file) as below:

X001234
X001345Y002323
X00142
X001567

How do i program, if I want to enter Y002323 to the next line? and how I can add '0' character after X00142 so that the the array is like this:

X001234
X001345
Y002323
X001420
X001567

thanks a lot;) .

-ct

Recommended Answers

All 6 Replies

Hi guys,
I need ur help.
If I have character strings (data array file) as below:

X001234
X001345Y002323
X00142
X001567

How do i program, if I want to enter Y002323 to the next line? and how I can add '0' character after X00142 so that the the array is like this:

X001234
X001345
Y002323
X001420
X001567

thanks a lot;) .

-ct

Software, what a wonderful thing. The hardware that exists within our computer act as a super highway on which our software composed of ones and zeros propagate, giving hardware its true purpose. Such control is rather compelling, in that we determine the computers fate, define its purpose and guide its destiny. How does Software work? What is this beautiful thing known as Software? What do I need to know in order to write Software?


As a result of the accepted “Von Neumann” architecture, hardware that perform specific tasks receive instructions in binary form that instruct the specific peice of hardware what to do and perhaps how to do it (i.e. Options). The CPU (Central Processing Unit) of a computer does essentially that; it reads instructions from RAM (Random Access Memory) and acts depending on the instruction extracted. The “instruction” set of a given processor is a complete list of valid instructions the processor accepts. Basically the software we develop, using what ever programming language, are broken down into sequences of instructions defined for an instruction set.


Computers use something known as an OS (Operating System) such as Microsoft Windows or Linux, which is the software that knows how all the device work in the system and how to interact with those devices. OS's provide API (Application Programming Interfaces) which is composed of software programming code that software developers use so that they can write application programs that indirectly interact with the devices in a system; the OS acts as an intermediary. Once we know a programming language that can be used along with the API's of an OS we can then use our creative minds to tell a computer to do some interesting stuff, through software. At which point, we see the true beauty of Software.


As explained above, each processor has its own instruction set used to instruct the processor. As a consequence lower level programming (i.e Assembly) which are made up of Mnemonics, labels that represent a given instruction so we don't have to write a bunch of binary code, are unique to its processor counterpart. So high-level programming languages were invented which provide even more human readable symbols and a “compiler” that translates your high level “source code” into the Assembly that is specific to you CPU. This allows you to write software code without worrying about the spec's of you computer system.


The first thing you'll need to do is learn a programming language, a high level one if you're a newbie, during which you should learn about your OS's standard library which you'll probably initially use instead of using the raw OS API libraries; The standard library wraps the raw API's. A good language to learn for newbies would be something like Visual Basic or Java. Then you can move onto more difficult high level languages such as C or C++ , which allow for more precise functions and operations to be defined, and much more. Also, while you're learning a programming language you'll probably want to download an GUI (Graphical User Interface) IDE (Integrated Development Environment) that you can use to practice; the GUI IDE is usually easier to use and more intuitive, as opposed to a command line compiler. Now you can start your programming journey, eventually becoming a programming master.


While you're on your journey, you can sign up with many web forums where you can post questions and problems, or post suggestions and ideas. This is a great resource that has helped so many already, so it'd be a good idea. Once you've learned a language you'll notice it is easier to learn others because you've learned the basic concepts of programming in general. All you'd need to do is learn the languages syntax and semantics. Learn the language, express yourself through your programming and become a master at the art.

Good luck, LamaBot

@Lazaro: Did you mistakenly post your reply to the wrong thread? ^_^

@Lazaro: Did you mistakenly post your reply to the wrong thread? ^_^

@Joeprogrammer: Just thought I'd guide the newbie and give him some incentive. Please don't tell. :lol: I mean.... crap, I did!

LamaBot

P.S. You need to teach me ascii art; through PM of course. Hehe.

I guess Lamabot's reply should be used as a template for those who are in need of ready code.... its less sarcastic, snappy and cocky. ;)

I guess Lamabot's reply should be used as a template for those who are in need of ready code.... its less sarcastic, snappy and cocky. ;)

Actually it was a mistake to post that there, I meant to post it in the blogs window I had open. I'm actually not experienced enough to be cocky. The sarcastic perception is direct result of my post for the newbie. Sorry, I wish I could delete it or edit it.

LamaBot

Actually it was a mistake to post that there, I meant to post it in the blogs window I had open. I'm actually not experienced enough to be cocky. The sarcastic perception is direct result of my post for the newbie. Sorry, I wish I could delete it or edit it.

LamaBot

Oh, you are gettting me all wrong. I was just joking. It really was an interesting read.

Do you seriously want to edit it out ? If so, I would need to fill it with something, so that the continuity is not broken.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.