If the only exit point is on the total > 200
do
do_some_tasks
if total > 200 then
do_total_related_tasks
end if
loop until total > 200
that can be simplified to
do
do_some_tasks
loop until total > 200
do_total_related_tasks
For a more general, multiple exit point, the fastest option is the exit do
do
do_some_tasks
if total > 200 then
do_total_related_tasks
exit do
end if
other_tasks
loop while true
Or, for a more general solution, use a variable
keepTesting = true
do
do_some_always_tasks
' start to test conditions
if keepTesting then if total > 200 then
do_total_related_tasks
keepTesting = false
end if
if keepTesting then if other_exit_condition then
.....
keepTesting = false
end if
.....
loop while keepTesting
Or whatever other construction depending of the real problem.