selecttype ; select gateway or ihe
     read "Deployment Type? (G)ateway or (I)HE: ", dtype

dataentry ; first data entry routine
     if (dtype="G") {
          set dtypeFull = "Gateway"
     elseif (dtype="I") {
          set dtypeFull = "IHE"
     else {
          write !,"Invalid Choice",!
          goto selecttype
     }
     Write !, "Starting ", dtypeFull," deployment..."</div>

 

This was what I first wrote.  Here is the test, first putting in an invalid value:

Deployment Type? (G)ateway or (I)HE: F
Invalid Choice
Deployment Type? (G)ateway or (I)HE: G
Starting Gateway deployment...

 

Then I saw this tutorial page where they call a method with "do".  So, I changed my "TODO" to a "DO".  Absolutely no other changes, now if I do the same test, here are the results:

Deployment Type? (G)ateway or (I)HE: F
Invalid Choice
Deployment Type? (G)ateway or (I)HE: G
Starting Gateway deployment...
Starting Gateway deployment...

 

Why does it output the last line twice with "DO"?

 

 

</body></html>