BBC BASIC
« BBC BASIC for Linux (86) v0.07a »

Welcome Guest. Please Login or Register.
Jan 23rd, 2018, 4:47pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BBC BASIC for Linux (86) v0.07a  (Read 1524 times)
RajivTyagi
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #4 on: Sep 16th, 2016, 12:54pm »

Thank you very much for the prompt and detailed response, Richard. It's after office hours here in India. But I will send you my code tomorrow. Running it in BBCSDL will show the various errors that result. The code is very much work in progress so you will find the display a little awry on account of logical errors, but the code runs without syntax errors in BBC4WDEMO.

Successively commenting out lines reported with errors by BBCSDL, removes functionality but finally begins running the code...

Sincerely,
RT
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #5 on: Sep 16th, 2016, 3:05pm »

on Sep 16th, 2016, 12:54pm, RajivTyagi wrote:
Running it in BBCSDL will show the various errors that result.

Just to reiterate that BB4W and BBCSDL share the same BBC BASIC interpreter so as far as 'pure BASIC' code is concerned the compatibility is 100%. Of course once one moves outside the realm of BASIC into OS-dependent features then they aren't, and can never be, fully compatible.

It's best not to think of BBCSDL to be in some way a development of BB4W, it isn't. They are both implementations of the BBC BASIC language but for completely different platforms: MS Windows in one case and SDL 2.0 in the other. Writing programs that will run on both is possible (the three 'IDEs': touchide.bbc, BBCEdit.bbc and SDLIDE.bbc are examples) but requires a very different approach from writing programs for BB4W.

So whilst I'm happy to see your program I'm not able to provide a 'conversion service', if that was your hope.

Richard.
User IP Logged

PatrickM
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #6 on: Apr 5th, 2017, 9:26pm »

Hi,

BBC Basic is my favorite language to work in, I do most of my programming in it. Until now I've only used the Brandy basic interpreter. Tonight I've been trying out BBCSDL, and it's good.
Though I'm having a couple of problems with it:

* SDLIDE doesn't work, it seems to crash with error "No such font".
* It seems like I can't open files with OPENIN unless the file's name ends in .bbc.

I'm using Debian GNU/Linux 8, AMD64 version.

-PM
« Last Edit: Apr 5th, 2017, 9:26pm by PatrickM » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #7 on: Apr 6th, 2017, 10:15am »

on Apr 5th, 2017, 9:26pm, PatrickM wrote:
SDLIDE doesn't work, it seems to crash with error "No such font".

Can I assume that you are running the latest version of BBCSDL (v0.16)? The subject line refers to v0.07a, which is very old, but that may simply be because you are replying to an old thread.

One possible reason for a 'No such font' error is a corrupted or invalid 'sdlide.ini' file (in your @usr$ directory). Try deleting that file first.

Failing that you can always debug the issue yourself (SDLIDE.bbc is an ordinary BASIC program). If you find something that I need to fix let me know.

Quote:
It seems like I can't open files with OPENIN unless the file's name ends in .bbc.

That's no different from BB4W and all the other versions of BBC BASIC from my 'stable' for the last 35 years! The extension defaults to '.bbc' but you can of course specify any other extension, or none by adding a trailing dot to the filename:

Code:
      file% = OPENIN(@dir$ + "noextension.") 

Richard.
User IP Logged

rpc
New Member
Image


member is offline

Avatar




PM


Posts: 1
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #8 on: Apr 7th, 2017, 12:35pm »

I can confirm that the "No such font" error is caused if you first run the application from one location and then move it to another. The solution is to delete the sdlide.ini. At least in Ubuntu 16.04 this is in .local/Share/BBCBasic.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #9 on: Apr 7th, 2017, 12:53pm »

on Apr 7th, 2017, 12:35pm, rpc wrote:
I can confirm that the "No such font" error is caused if you first run the application from one location and then move it to another.

Yes, exactly the same thing happens in Mac OS; it's because the absolute path to the font's TTF is stored in the ini file, which of course ceases to be valid if you move the application.

Some while ago I looked into what would be involved in working around this issue but I judged the complication to be out of proportion to the benefit, considering that deleting the sdlide.ini file is such a straightforward fix. Discovering its location is simply a matter of typing 'PRINT @usr$' in immediate mode.

Richard.
User IP Logged

PatrickM
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #10 on: Apr 7th, 2017, 8:28pm »

Thanks, deleting sdlide.ini fixed the problem.

Quote:
That's no different from BB4W and all the other versions of BBC BASIC from my 'stable' for the last 35 years!


Right, I see, I didn't know that. I actually haven't used BB4W, up until now I've only used BASIC on the BBC Micro and in RISC OS, and the Brandy interpreter on linux, which behave differently in this regard. Thanks for letting me know.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: BBC BASIC for Linux (86) v0.07a
« Reply #11 on: Apr 7th, 2017, 9:18pm »

on Apr 7th, 2017, 8:28pm, PatrickM wrote:
I've only used BASIC on the BBC Micro and in RISC OS, and the Brandy interpreter on linux, which behave differently in this regard.

It is usual in CP/M, MS-DOS and Windows for a 'default' extension to be assumed if none is explicitly supplied; the idea being that the application knows what file type is most appropriate for the particular operation. So if the filename you provide contains no 'dot' that default extension will be appended. In the special case of a file with no extension (which is rare in those Operating Systems, but less so in Unix) that is indicated by adding a trailing dot.

Admittedly I have on many occasions questioned whether defaulting to .bbc was sensible for OPENIN, OPENOUT and OPENUP, since that extension is supposed to indicate a tokenised program file. The conclusion I invariably come to is that it wasn't - probably something like .dat would have been a better choice - but that making a change now would break far too many existing programs.

You may well encounter more differences that have resulted from the divergence between the 'Wilson' and 'Russell' branches of BBC BASIC (a divergence which started very early on, for example in that 'suffixless' variables are numeric variants not floats). I hope you won't find the transition too traumatic!

Richard.

User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls