I've made a BBC BASIC for Windows version of the little calculator demo supplied as an example program with BBC BASIC for SDL 2.0, it can be downloaded from here (group members only). As well as being a practical tool it illustrates the use of the EVAL function.
In its original form this program is primarily intended to be used with a touchscreen of course (e.g. in Android or iOS) but can be driven from the mouse or keyboard. If you are running Windows on a laptop you may well have a touchscreen anyway.
One feature of interest is that it's a rare example of a program which draws all its graphical elements in proportion to the current window/screen size. This ensures the maximum possible quality, typically better than the simpler scaling approach can achieve.
The conversion involved very few changes, mainly just replacing calls to the aagfxlib library with equivalent calls to the gdiplib library, and substituting a suitable Windows font (the choice was limited by wanting a Unicode character set containing the 'backspace' symbol).
BB4W version of calculator demo
Re: BB4W version of calculator demo
I should add that this could be done with confidence because all the graphical elements are anti-aliased, hence can be drawn with sub-pixel precision. That's not true of the text however (anti-aliased, but the size can only be specified as an integer number of points) so a little more care needs to be taken with that.Hated Moron wrote: ↑Sun 22 Oct 2023, 16:37 One feature of interest is that it's a rare example of a program which draws all its graphical elements in proportion to the current window/screen size.