Eh.... I think I understand what you are asking. Basically, you are on the right track.
The "while" function will keep looping thru it's code until it's condition is no longer true. In other words, it will repeat the code "while" the condition is true. It checks the condition just before the BEGINNING of the code is executed. If the condition is true, it executes the code. If it is false, it skips the code and moves on to the next line. Example:
_x = 1;
while {_x < 10}
do
{
_x = _x + 1;
_x = _x + 1;
};
hint format ["%1", _x];
The script will set x to 1. Then it will check to see if x is below 10. It is, so it goes on and executes ALL of the code (adds 1 to x twice). Then it loops back up to the "while", and checks again whether x is less than 10. It keeps doing this until x is greater than or equal to 10, and then it jumps down to the hint (which would end up displaying 11).
So, again, it only checks the condition right before executing ALL of the code. It will not "end" right in the middle of it's code. Basically it works just like the "goto" loop that you used in your example.... with a few restrictions.
First off, in a script, all of the code in the "while" loop must be put on one line, making it hard to read. Secondly, you cannot have delays ~1 in a while loop (or in any codestring, for that matter). Last, there is a limit to the number of times the "while" code can loop, so it cannot be used for an infinite or indefinate loop like goto's can.
So basically, there aren't really any advantages to using "while" if you are already used to looping goto's. Normally, using 'goto' statements is bad programming practice, but with OFP, you take what you get I suppose:) . However, you cannot use goto's in functions, so you must use while's instead. Luckily, you can put the code on multiple lines in functions, so it isn't a problem.