Showing posts with label library. Show all posts
Showing posts with label library. Show all posts

Wednesday, January 17, 2024

Organize and Share Your Code Effortlessly: Exploring the Liberty BASIC Lesson Browser

 The Liberty BASIC Lesson Browser is a super helpful tool for anyone using Liberty BASIC, a really user-friendly programming language. This browser isn't just for learning; it's amazing for keeping all your coding projects neat and organized.

When you use the Lesson Browser, you can easily find your way around lots of programming lessons. But the best part is how it lets you keep all your own codes and programs in one place. Whether you’re working on a small project or something big, this browser makes it easy to save your work, put it into categories, and find it again whenever you need it. This is super handy because it helps you see how much you’ve learned and find old projects quickly.

If you like sharing what you make with others, the Lesson Browser is great for that too. You can show your codes and programs to other people who use Liberty BASIC. This is not only fun but also a great way to get new ideas and make your work even better.

For educators this tool is super useful because it makes it really easy to build educational materials, and for students it provides a great way to keep all your work organized.

So, in short, the Liberty BASIC Lesson Browser is more than just a way to learn programming. It’s a really useful tool for keeping your own coding projects organized and sharing them with friends and other coders. It's a must-have for anyone using Liberty BASIC.

Watch a demo of the Lesson Browser!

Friday, August 19, 2016

Graphing Data - Setting the stage

If I have a set of data for sales, or temperature, or mosquito populations, or anything at all and I want to plot it on an X/Y graph, what are my choices for layout?

Should our graphing library figure out what the ranges are and set its own scaling?  Should it require that we tell it up front what the X and Y scales are?  Maybe it can even be designed to allow for changing the scale on the fly?

It would be great if our data plotting graphics library could handle plotting to screen, saving that to a file as a bitmap, and also plotting to a printer.

How about data sources and formats?  Should we design it to accept one or more strings of delimited values?  In the graphing example at runbasic.com it allows you to upload a CSV file with data to plot.  Maybe as an interesting example I should find a downloadable file from a scientific website and the project should be to plot a graph from that?

Feedback welcome.  More to come.

Wednesday, May 30, 2007

Modules and Run/Liberty BASIC

People have been asking for a way to create code libraries in Liberty BASIC for some time. I have thinking about how to do this using an in-memory model. Over the weekend Scott and I worked on adding some modularity to the Run/Liberty BASIC language. Here's how it works so far. We are open to suggestions.

The RUN statement has a new form. If I want to use mymodule.bas as a module in a program I am writing I would code it like this:

run "mymodule.bas", #myModule

This causes mymodule.bas to be compiled into memory. It will execute code up to the first wait statement. This is how values will be initialized. The program then becomes an object assigned to the #myModule handle.

Then you can call any function on that program from within the calling program, like so:

#myModule myFunction(myParameter)

or even use the invokation in a more complex expression:

print "digits: "; len(#myModule myFunction(myParameter))

You may recognize this syntax as being the same as for controlling widgets. It relies on the same underlying mechanisms to do its work.

When we're done with this, modular programs loaded this way will be cached in memory and will only recompile when the source file changes.