02-02-2026, 04:44 PM
The problem with any sorter is keeping a working program flow.
SUB INT
DEFINT A-Z
END SUB
SUB FOO
PRINT LEN(x)
END SUB
As is, foo would print 2. Move foo before Init and it’ll print 4. Certain commands operate on a simple top-down approach and shuffling code segments can shuffle the application of those commands. DEF isn’t as common as it used to be, but $IF statements follow this same logic. Any routine that shuffles subs/functions will have to be tested for these edge cases so it doesn’t break stuff.
SUB INT
DEFINT A-Z
END SUB
SUB FOO
PRINT LEN(x)
END SUB
As is, foo would print 2. Move foo before Init and it’ll print 4. Certain commands operate on a simple top-down approach and shuffling code segments can shuffle the application of those commands. DEF isn’t as common as it used to be, but $IF statements follow this same logic. Any routine that shuffles subs/functions will have to be tested for these edge cases so it doesn’t break stuff.


