I'll spare you all of the details, but the procedure had to join several tables into a result table to pass to a spreadsheet-style display screen on the client machine, where it would be used for editing documents. The specs for what was to go into the grid varied from situation to situation. The programmer did not know SQL very well, either. I am sure that this programmer thought he was writing structured code, because he only used a goto statement to get to the error routine code at the end of the procedure. For you younger programmers, hybrid data is data that is used as both a control flag and as values, so you never have any idea what it is doing when you see it in a code module.
Dual data is a related error where one variable is used to hold two different types of data.
This tangled structure left you with a path of control through the program that looked like a plate of spaghetti. When you have a program with complicated logic, you really should make a decision table and code from it. The atomic option says that all of the statements in the block must execute successfully or they are all rolled back. There is probably a good book in this somewhere. However, negative values for n do have a very nice mathematical interpretation.