FireBFM Posted October 5, 2011 Posted October 5, 2011 i know Mid$, Left$, Right$, Len() and For/Next loop. I have 2 string values. I need to take the last character of the 2nd string, then first character of the first string, then 2nd last character of second string, then 2nd character of first string(keep repeating)... After i print the new string. For Example: "fire" "man" = nfaimre I'm stuck here. For X = 1 to ??? ????????????????? Next X
ewmon Posted October 6, 2011 Posted October 6, 2011 Obviously, your program needs to determine a couple of facts before the "For X = 1 to ???" statement. I was always told that it's good practice to null the new string --- so you know how to do that, right? As for the "???", how do you determine the number of times you need to run through this loop? I need to take the last character of the 2nd string Well, you already have it, so that's solved. And so are all the other actions like this one. You "have" them already ... they're stuck in strings. But you want to isolate them and then *DO* something with them. What do you want to do with them? Think of a computer as a really stupid person (which they are), where you must tell it every simple step of a procedure that you want it to do.
FireBFM Posted October 6, 2011 Author Posted October 6, 2011 i know the code to reverse the second string. New problem: NewPhrase = first character of one string, then first character of other string, second character of one string, then second character of other string... Still need help on loop. answers please.
ewmon Posted October 9, 2011 Posted October 9, 2011 you want to isolate them and then *DO* something with them. What do you want to do with them? You know can isolate them with the string functions you've given us. What you want to do with each character is called "concatenation". How do you determine how many times the loop must run? It's common sense.
FireBFM Posted October 11, 2011 Author Posted October 11, 2011 Thank you. i finished my homework. someone helped me from yahoo answers.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now