We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDCall Extension
#11
(05-21-2024, 05:12 AM)z-s Wrote: You could see examples of ldcall in litdev samples

(translated by Google translator)

Thank you, dear Z-S.
But I couldn’t find an example of using the “LDCall.CallInclude()” method that would explain everything as well as LitDev did in his message.  Angel
Now that LitDev has explained everything, it seems to me that I understand everything.
Reply
#12
(translated by Google translator)

Hi all.  Smile
So far, everything works for me using the "LDCall.CallInclude()" method.
But the Snake, controlled by the current AI, bites its own tail too often.
The snake lacks data about the position of its body segments.
I transfer variable values successfully. But, now I am forced to pass an array or a list.
I want to experiment using arrays and lists in an include file.
But, as an adult, I have to ask: is there anything that I absolutely SHOULD NOT DO during these experiments?

Thank you.
Reply
#13
Hi,

No you should be good.  There are a couple important features of Small Basic:

1] All variables  (numbers, strings, arrays, images...) are stored as one type (Primitive)
2] There is global scope - all variables are 'seen' by every bit of code

In many ways to some people these are serious limitations, but for me they are some of the things that actually makes Small Basic fun and users can rely on even with extensions.  So everything I do I try to keep these and LDCall is no different.  This is unlike sVB for example that has taken the path to extend the language and compiler - my fealing on this is that once you really want more, go straight to C# or other modern language.  But we are all different so all routes on a coding journey are good!
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#14
Thank you, LitDev.

If I understand you correctly, then my experiments should not cause serious failures in the computer.
I say this because yesterday, when I ran the CallInclude code for the first time, the program crashed. And at the end of two arbitrary lines of code that was opened in SB-Prime, the text that was on the clipboard was unexpectedly added.
So I decided to ask for advice from someone who knows more than me.  Angel

Thank you.
Reply
#15
AB,
No idea what your issue was, but not something I would expect to be caused by using LDCall Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)