Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help converting old style def fn functions
#4
(07-08-2022, 12:27 AM)James D Jarvis Wrote: In this function X and Y will always be 0.

---------------------------
Function FND (Q)
    FND = (64 * (Q - 1)) + (8 * (X - 1)) + Y

End Function
----------------------



not 100% sure it'll work but I'd recommend adding this line after the original source code line 1130:

Dim Shared x, y

Thanks, I think that may be it! 
It makes sense that those would be global variables with the old Def Fn.
Reply


Messages In This Thread
RE: need help converting old style def fn functions - by madscijr - 07-08-2022, 04:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Converting a MIDI file to text (csv, tab-delimited, etc.) and back again? madscijr 7 2,302 03-11-2025, 11:00 PM
Last Post: madscijr
  Date functions dritter 31 5,003 05-20-2024, 04:22 PM
Last Post: dano
  Declaring Functions AS TYPEs TerryRitchie 14 2,864 08-17-2023, 12:41 AM
Last Post: bplus
  Questions on style justsomeguy 23 4,441 06-28-2023, 08:31 PM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: