Control Structures
Control structures are used to control the flow of your program. maxscript has the usual expected control structures like any other language but some of them do not always work as expected.
Furthermore testing out control structures in the listener can be a limited. It is probably better to write a small script file and run it each time instead.