Compile Issue

Here you can talk about anything related to BBC BASIC, not covered in another category
MattC
Posts: 114
Joined: Mon 16 Apr 2018, 06:17

Compile Issue

Post by MattC »

Hi,

My prog works fine running from the IDE. However, when I try to compile it, there is an error: "No such variable". I have narrowed the issue down (using a 'STOP' command in various places) to the following line, and it only happens when compiling using the 'Concantinate Lines' crunch option. If this is off, then the error does not occur. The lines are only a dozen into the program.

Code: Select all

      REM __________Numerics
      SysClick% = 0            <===== this line
      Quit%     = FALSE
      Focus%    = 0
Any ideas why?

I don't need the option, so omitting it is not a problem, but I can't see why it happens.

Matt
Hated Moron

Re: Compile Issue

Post by Hated Moron »

MattC wrote: Sat 03 Dec 2022, 20:48 Any ideas why?
Sounds like a bug in the cruncher. Is this BBCSDL (in which case it might still be possible to fix it) or BB4W (in which case it isn't)?

If it's BBCSDL, please try to create a Minimum Reproducible Example.
MattC
Posts: 114
Joined: Mon 16 Apr 2018, 06:17

Re: Compile Issue

Post by MattC »

Unfortunately, it's BB4W.

Matt
Hated Moron

Re: Compile Issue

Post by Hated Moron »

MattC wrote: Sun 04 Dec 2022, 06:49 Unfortunately, it's BB4W.
Could you port it to BBCSDL? What, if anything, makes it BB4W-specific?

Although BB4W remains 'supported' it's unmaintainable: bugs can't be fixed, and it cannot be adapted should changes be made to Windows which render it inoperable (most obviously, dropping support for 32-bit apps).
Edja
Posts: 64
Joined: Tue 03 Apr 2018, 12:07
Location: Belgium

Re: Compile Issue

Post by Edja »

..... cannot be adapted should changes be made to Windows which render it inoperable (most obviously, dropping support for 32-bit apps)
Isn't it to be expected that Microsoft will include a 32-bit Windows emulation ?
Edja
Hated Moron

Re: Compile Issue

Post by Hated Moron »

Edja wrote: Mon 05 Dec 2022, 09:24 Isn't it to be expected that Microsoft will include a 32-bit Windows emulation ?
Who knows. I don't think Apple did that when they dropped support for 32-bit Mac apps or 32-bit iOS apps, did they? And anyway you can argue that this is effectively what happens now: there's no such thing as 32-bit Windows any more, so when you run a 32-bit app like BB4W it is already running in an 'emulation' of a 32-bit OS running on 64-bit Windows.

In the same way that you can still run 6502 BBC BASIC on a BBC Micro emulator, or MS-DOS BBC BASIC in DosBox, I'm sure there will be some way to run BBC BASIC for Windows when there's no longer an Operating System that will run it directly. But that will only be of interest to 'retro-computing' enthusiasts, not a way to write native applications.

Knowing that I don't have much time left, I've tried to provide a 'future' for my variety of BBC BASIC by making it Open Source, porting it to virtually every mainstream platform and ensuring that as much as possible of the source code is 'accessible' (in reasonably portable C for the interpreter and in BBC BASIC itself for the IDE and tools).

But BB4W is excluded from this, because it's closed source and coded in assembly language (which is incomprehensible to me, now, let alone to anybody else). So that doesn't have a development path, or even a route to being maintained. I'd be very happy for somebody to investigate how difficult it would be to support native Win32 API controls in BBC BASIC for SDL 2.0 when running on Windows.
MattC
Posts: 114
Joined: Mon 16 Apr 2018, 06:17

Re: Compile Issue

Post by MattC »

Hated Moron wrote: Sun 04 Dec 2022, 10:17 Could you port it to BBCSDL?
I have to be totally honest, here. I have no idea what that means. I tried looking at other forms of BBC Basic on the bbcbasic.co.uk website, but I'm not getting any younger and my brain is struggling to cope with new things.

Matt
Hated Moron

Re: Compile Issue

Post by Hated Moron »

Hated Moron wrote: Mon 05 Dec 2022, 11:16 Who knows. I don't think Apple did that when they dropped support for 32-bit Mac apps or 32-bit iOS apps, did they?
Coincidentally I found this today which confirms that Android is dropping support for 32-bit apps soon (and one device, the Google Pixel Tablet, already has). This will impact BBC BASIC because the Android edition is currently only 32-bits, and although I can build a 64-bit version, compatibility will suffer slightly.

So I would say the writing is definitely on the wall for 32-bit applications in general. Windows may well be the last mainstream OS to drop support, but it's almost certain to happen.
Hated Moron

Re: Compile Issue

Post by Hated Moron »

MattC wrote: Mon 05 Dec 2022, 18:15 I'm not getting any younger and my brain is struggling to cope with new things.
If this is a contest, I bet my brain is struggling more than yours! Seriously, I'm so pleased that my (tentative) diagnosis of Alzheimer's Disease came when the symptoms were sufficiently minor that my ability to develop BBCSDL wasn't too impaired. Now, I wouldn't be able to do it at all.

The document describing the differences between BB4W and BBCSDL is here, if you think it should be practical, I'd definitely suggest attempting to port your application.
MattC
Posts: 114
Joined: Mon 16 Apr 2018, 06:17

Re: Compile Issue

Post by MattC »

Hated Moron wrote: Mon 05 Dec 2022, 20:02 If this is a contest, I bet my brain is struggling more than yours!
:) (or should that be :cry: ). I've so loved working with, particularly, BB4W over the past years, I can't thank you enough for producing it. My programs are only small (and even then I struggle sometimes) but programming in BBC Basic has been a great help.
Hated Moron wrote: Mon 05 Dec 2022, 20:02 ...if you think it should be practical, I'd definitely suggest attempting to port your application.
Thanks for the link. I'll look into it. As stated earlier (in this particular instance) I don't think I need to worry too much. However, other programs might require it, so I'll definitely bear this in mind.

Thanks for your advice.

Matt