Like many other RISC OS users, I started programming in BBC BASIC. Although it served me well, I began to find that it didn’t always scale well – especially when software had to handle large, variable amounts of data or multiple documents.

After learning C on Unix systems, I began to investigate how it could be used on RISC OS. My first efforts directly copied the techniques used in BASIC, and quickly became just as unweildy as their predecessors.

Eventually I settled on using a combination of OSLib and my own libraries – imaginatively called SFLib – based on it. Together, these have formed the basis of all of my software which has been started since 2000.

The aim of this guide is to give some help to those who are competent in C but have not used it when writing for the RISC OS desktop. It will also introduce the use of SFLib, which may be of interest to those writing Wimp software using OSLib.

Many thanks to all those on the ROOL Forums who have answered my questions about the DDE and offered suggestions while I’ve worked on this guide.

Chapter 1: Starting in BASIC
For those familiar with BBC BASIC, we start by getting a simple application up and running using this language.
Chapter 2: Moving to C
We can write a very similar application in C, which should help show the parallels with – and differences from – BASIC.
Chapter 3: Compiling the Application
How to get the code using OSLib to compile in the DDE.
Chapter 4: Event Driven Programming
The RISC OS Wimp is essentially an event-driven environment, so why don’t we take advantage of that?
Chapter 5: A Better Way to Compile
Compiling the code ‘by hand’ soon becomes very tedious.
Chapter 6: Onto the Iconbar
Giving an application its own icon on the iconbar isn’t too hard to do.
Chapter 7: Clicks on the Iconbar
There’s not much point having an iconbar icon if it doesn’t respond to the user!
Chapter 8: Reporting Errors and Other Messages
It’s time to start communicating with the user...
Chapter 9: A Look at Debugging
Before moving on to the ‘serious stuff’, it might help to take a look at a tool to help us see what’s going on.
Chapter 10: Closing the Loose Reporting Ends
Now that we can use Reporter to quickly see what’s going on in our code, let’s tidy up the report code a little.