Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interweaving SUB and FUNCTION
#11
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fast replace$() function mdijkens 10 1,888 04-19-2025, 06:27 PM
Last Post: mdijkens

Forum Jump:


Users browsing this thread: