prepending and appending

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
cryptid
Newbie
Posts: 9
Joined: Thu Aug 18, 2005 2:57 am
Contact:

prepending and appending

Post by cryptid »

hi this is my first post,, my problem is that
i want to make a program that will take users input and it should prepend and append a certain word to the line that the user has entered for example :

the user has entered the word "hi i am cryptid" what i want to do is that take that line and and add a "(" to the begining and ending of the file so the final text will be

("hi i am cryptid")

i have given only 1 line inthis example but i my program i should be able to take multiple lines and brackets to it

plz help me

or even if my program is able to pick up files from a text file and modify it in the same manner it would be ok

thanx
Guest

Post by Guest »

'Is this what you mean?

<font face="System">
CLS
LINE INPUT "Text: "; t$
t2$ = "(" + t$ + ")"
PRINT t2$
</font>

Regards,
Michael
Post Reply