Help Wanted

need help with blitz basic – leet hacker

leet hacker

Member

Posts: 118
From: Hobbiton, Shire, Middle-Earth
Registered: 07-30-2007
i'm programming something in blitz basic in which you type something in the input field and then it replaces certain letters with other letters (like replacing r with w). does anyone know how to make the program replace more than one letter? (like replacing r AND l with w)

------------------
| @|V| 1337 |-|@><0|2. |"|-|@3|2 |V|3.

[This message has been edited by leet hacker (edited July 30, 2007).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Sure:

Input_String$ = input$("What is your original String?")
Replace_String$ = replace(Input_String$,"a","z")
Replace_String$ = replace(Input_String$,"b","y")

Basically just 2 lines, if you were looking for a parameter in Replace(), then it isn't there, I checked the help.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto
I reserve the full right to change my views/theories at any time.

leet hacker

Member

Posts: 118
From: Hobbiton, Shire, Middle-Earth
Registered: 07-30-2007
i tried that (after you suggested it) and it didn't work. did it work for you? i am also using the demo version of blitz, so maybe that had something to do with it. but thanx anyway.

------------------
| @|V| 1337 |-|@><0|2. |"|-|@3|2 |V|3.

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
mistyped it, sry.

Input_String$ = Input$("What is your original String?")
Input_String$ = Replace(Input_String$,"a","z")
Input_String$ = Replace(Input_String$,"b","y")
Print Input_String$

Its case sensitive so that may be why you had trouble.
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto
I reserve the full right to change my views/theories at any time.

[This message has been edited by Mene-Mene (edited July 30, 2007).]

[This message has been edited by Mene-Mene (edited July 30, 2007).]

leet hacker

Member

Posts: 118
From: Hobbiton, Shire, Middle-Earth
Registered: 07-30-2007
Thank you very much!! It works very well. I was programming something that translates your text into Elmer Fudd. You saved me countless hours of frustration. (seriously)

------------------
"Oh! Gravity. Why cant we seem to keep it together? Sons of my enemies, why can't we seem to keep it together?" - switchfoot

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
That's what I'm here for! I'm glad I could give something back to the community.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto
I reserve the full right to change my views/theories at any time.