Converting C Loop To XOJO

Ugh, you’re right about that. Ok, While…Wend it is! Thanks for the help!

The end condition is tested AFTER the loop, not BEFORE, so a while/wend is incorrect. Syed had it right.

I’m sorry Tim. You are wrong.

Yup. You’re right. I was wrong. Just read up a bit closer on C for-loops due to that nagging doubt in the back of my mind. Was just about to post a retraction when you posted.

I was also wrong.

This is an extremely important point, as you can see by the discussion of such seeming minutia as when the condition is evaluated.

Funny enough, I had a discussion recently with my son, who is fluent in Japanese. I asked if he’d considered translating from English into Japanese. His response was that he could get a job translating Japanese -> English, but not English -> Japanese, because with natural language translation, you need to know the TARGET language like a native. You don’t have to be quite as proficient with the SOURCE, given a minimum level of fluency. Quite the opposite of programming languages.

Only 3 really important things occurred here:

  1. The OP had answers and a solution.
  2. The OP learned.
  3. More people can learn from this post.

Even the guesses were interesting. All posts here usually are interesting.

How about this then:

For Each i As Integer In pred
  //do stuff
Next

It does not follow the array of indexes.

Yep. For simultaneous translations, interestingly I saw this exactly today. A native German and a native Brazilian translating the same person to Portuguese WHILE he was talking. The Brazilian one was 10x more fluent. Both could capture the essence of the source while talking, but only the native could choose the best words with fluency and EVEN express the sentiments and emotions from the source, while the German native was saying hard to understand words with gaps, in a cold way, and many phrases I could not understand the meaning.

Your son is right. Years ago I used to translate PC News’ Spencer Cat column to French. It took all my skills in that language to obtain a good result from that rather elaborate and often tongue in cheek column. The American team even had that translated back into English to verify the quality, and it passed fine.

Actually, with computer languages, it probably takes a good knowledge of both languages : otherwise, the target will be spaghetti code :wink:

But at least it will be accurate. As evidenced from this simple example, without solid knowledge of the source language, the result could be subtly wrong, no matter how elegant.

Indeed, thorough understanding of the source is a prerequisite.