I had it working with the previous program, then took your advice
I started to worry as I began reading this. Glad this went in a positive direction. Glad to see this worked out for you. It is usually good to spend the time to learn the correct methods for these simple programs so that you can apply them on more complicated things later. Otherwise trying to figure this out when you really need it can overcomplicate things and make it hard to troubleshoot.
I especially liked how you used goto statements in your comments as a kind of translation between the old format and functions. In general you comment your code very well. Much better than I do.
Really good work.