QB64 Phoenix Edition
external sub/function - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: external sub/function (/showthread.php?tid=715)



external sub/function - MasterGy - 08-02-2022

Hello !

I would like to collect all the sub/functions I have written so far to make a universal 3d engine. I would like sub/function to be in a separate file. attachment. What could be the problem ? it recognizes m_coll.bm, it does not indicate an error there. But it does not recognize the "veletlen" function. why ?


boss-program:
Code: (Select All)
Rem $INCLUDE: 'm_coll.bm'


print veletlen (10)

m_coll.bm (sub/function library)

Code: (Select All)
FUNCTION veletlen (x)
    veletlen = x * RND(1)
END FUNCTION

   


RE: external sub/function - admin - 08-02-2022

SUBs and FUNCTIONs go at the end of your code. Move the $INCLUDE from the 1st line to the last line of your program.


RE: external sub/function - MasterGy - 08-02-2022

(08-02-2022, 09:40 PM)admin Wrote: SUBs and FUNCTIONs go at the end of your code.  Move the $INCLUDE from the 1st line to the last line of your program.

OMG! Smile I didn't think of that! It already works!

Thanks for the answer and the speed!