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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SB Extension Compiler
#1
Hello everyone 
Can we have a full guide about SB Extension Compiler??
And may be we could add intense with this symbol ' 
I asked this because community was not active from some time .☺
Why beginners don't come here.

why facebook community member don't come here.

Sometime this make me angry.
Hope we will discuss,talk more.

Can we add litdev lib in sb Extension Compiler???
ZS
Reply
#2
SB Extension Compiler was something written by Fremy Company (of FC extension) a long time ago.  There is no further documentation for it.

@ZS - Since you have C# compiling capabilities with SharpDevelop I strongly recommend you write any extensions for SB using it, and for your language conversion project (requiring advanced RTB functionality that SB cannot do) I would suggest that you write the whole thing in C#.  We can support you in this and there is a lot on the web to help.

Despite a lot of members on Facebook, there are only a couple active users who mostly post geometric image programs; they are good fun but not pushing the limits of SB.  I think the projects going on here are actually more interesting Smile .  I sometimes hava look at activity here and we do get quite a few non-member guests.
Reply
#3
Litdev I may be a Professional to Small Basic But A Beginner To CSharp.
Any Books Don't Help In Understanding From Beginning.
Literal,variable,string,Console,Form They start Directly.
I Wish for a Book Graduating Csharp From Small Basic.
The Best Thing about this Community Is Limited member Three Or Four Active and No Member is spamer or hacker who copy ideas.
Any Moderator may Delete this Therad May Be He was a hacker
https://litdev.uk/mybb/showthread.php?tid=32
ZS
Reply
#4
ZS,

Small Basic is great for getting started with programming - a very low initial threshhold to get started and gradually exposes a programmer to major concepts.  The simple basic language encourages good programming skills to achieve impressive results within a limited framework.

However, it is limited and C# is probably the best next jump.

The main principal I would suggest is start small and build knowlege slowly.  You have many more internet resources (google, youtube, forums) than I ever had, where trial and lots error was the way.

So, first projects:

1] A windows program with one button that you press and it displays "Hello World" back - everyones first program in a new language.
2] A Small Basic extension with one method that adds 2 numbers.

Have a go, google lots (there are resources out there to help with both) and ask questions when stuck - try not to go too far too fast at the start.

PS, Nothing wrong with copying code ideas or public domain code!
Reply
#5
z-s

Let's suppose that files SmallBasicLibrary.dll and Turtle1.cs (created in Notepad++ for example) are in your working directory.

Code:
// Turtle1.cs
using Microsoft.SmallBasic.Library;

class Program
{
    static void Main(string[] args)
    {
        Turtle.Speed = 9;
        Turtle.Show();
        Turtle.PenUp();
        Turtle.Move(100);
        Turtle.TurnRight();
    }

Compile it from command line using C# compiler (see link one of Litdev's earlier post).
This means, paste line:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /r:SmallBasicLibrary.dll Turtle1.cs

into command line of your directory. After compiling, you should see Turtle1.exe file.

Then run it from command line: 
Turtle1
 
st
[-] The following 1 user Likes stevantosic's post:
  • litdev
Reply
#6
I made a short video on creating simple SB extension using SharpDevelop.  First time doing this kind of thing - needs to be viewed in high res to see text.

[-] The following 3 users Like litdev's post:
  • AbsoluteBeginner, stevantosic, z-s
Reply
#7
very helpful video litdev

I Created A Simple Forum Like This For Future Skull IDE UPDATES AND BUGS.
http://zs.rf.gd/Forum/
I Will Be Pleased If You Join Smile
ZS
Reply
#8
LitDev
Can We Have A Tutorial video of how to use Form Desinger in SharpDevelop ??
And A video about how to use external library like Scintilanet ??

Hello LitDev
Can This Code Will be helpful I tried CSC.exe , SharpDevelop , LDCall.InculudeCSharp All Show Error About $
You Are More Talented Programer Than Us.
I cant send so much big code so use sb to import csharp code Smile
QKSC994.000
ZS
Reply
#9
ZS,

I did the SBExtension video because there are some very specifc steps required which are hard to explain without a video.

But there is plenty out there getting started with SharpDevelop, I googled "SharpDevelop youtube" and got loads - some may be better than others for you, but its all there.

Remember its step-by-step.  It is not realistic to try to use Scintilla.Net as your first project.  I used SmallBasicLibrary as an external dll library in SBExtension video, so its already there!

The code you sent, all method call types must be type Primitive including arguments and other issues - you are trying to do too much too fast!

I am unsure what your objective is.  Is it your idea that writing an extension to call C# and run the program in Small Basic will make it easier to do complex stuff like Scintilla?  If this is the case, I'm fairly sure the answer is no - do it all in C#.  If you are experimenting with C#, again do it all in C# without extension.

If you really are interested in SB extension to call static libraries for its own sake - most libraries are not static and there will be loads of things you can't do calling from SB - then this works, ZCBX279.000.  I am nervous giving this example, because I am not going to write extensions for you to do something better done directly in C#.

My advice is to use youtube for SharpDevelop and go slowly, not searching for code fragments and trying to run them.

If your program doesn't compile go back till it does, then try adding a bit at a time.  If it compiles but doesn't do what you want, then debug it in SharpDevelop or go back to the last step that did work.  You have to go in small incremantal steps, each built on the previous one that worked.

So, first step is "hello world!" program. Step-by-step!
[-] The following 1 user Likes litdev's post:
  • z-s
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)