Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
external sub/function
#1
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

   
Reply
#2
SUBs and FUNCTIONs go at the end of your code. Move the $INCLUDE from the 1st line to the last line of your program.
Reply
#3
(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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Function Pointers? BlameTroi 5 230 02-20-2026, 05:55 PM
Last Post: BlameTroi
  function "_ARCSEC()" is wrong? BSpinoza 16 3,421 10-31-2023, 04:23 PM
Last Post: SMcNeill
  TYPE and CONST within SUB/FUNCTION TerryRitchie 9 1,948 07-11-2023, 01:22 AM
Last Post: bplus
  Query to function _InputBox$ Petr 10 2,033 03-31-2023, 09:53 PM
Last Post: mnrvovrfc
  instr function in reverse ??? doppler 3 750 02-10-2023, 02:33 PM
Last Post: doppler

Forum Jump:


Users browsing this thread: 1 Guest(s)