Jump to content

Recommended Posts

Posted

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

 

 

Posted

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.

Posted

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.

 

 

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.