Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

Hi .. in the process of getting a bit more familiar with the OSDK 1.11, I spent some time going through the samples this morning and trying to build everything .. And I encountered the project at osdk_1_11/sample/basic/game/BomberZ.bas, which is a very different BASIC variant than I would expect .. and indeed is different from other samples, e.g. osdk_1_11/sample/basic/hires_demo.

And in fact, it appears that Bas2Tap.exe doesn't like these 'weird basic' projects .. is there any reason for their inclusion in the project, perhaps there is a different Bas2Tap expected for these projects?

It's an historical thing: One of the forum users wrote a converter that handle auto numbering and labels, unfortunately the converter was written in Delphi or something else that was not C or C++ and thus would have been a major pain to maintain in the OSDK.

Are the Delphi sources around? I'd be willing to try to port it to something a bit more portable, or even try a FreePascal port that might even work .. or else, knowing the specs, add the feature to bas2tap?

Ideally the feature should be added to bas 2 tap, basically the idea is to allow two different things:
- Have the system automatically generate line numbers
- Be able to point to labels instead of numbers

For the sake of portability, I think both features should be able to work together, like you have a program that does that:

As far as specs, as said earlier, I don't like the & and #, don't see any reasons for them, could just be like in assembler, where things that start on the first column are labels, and the rest has to start with at least some white space from the left column.

Or even simpler anything not being a reserved word is a label unless in an assignment expression (in which it would be a variable). You don't really need line numbers (you can generate them in the end and substitute labels with the corresponding line number.

As of now, having a normal game with normal line numbers that compiles and run normally is probably the best idea.
Now, should that be this game in particular, I don't know.
As I said, it was some experiment from Wascol, and I don't remember why it ended up in the final SDK, probably because I put it in samples to test and it stayed there and was packed with the rest.

I actually made a version of Bas2Tap that natively handles the labels and do the auto-numbering.
By default the tool behave as before and expects a 100% standard Oric formated BASIC line, but I added some directives that allows to bypass that.

The reason I did that is that I'm not 100% confident that my changes are still 100% compatible with other Oric BASIC programs so I did not want to break it, and things like a +1 issue on the generated line numbers.

Here is what that looks like:

Basically what you can do is:
- Define symbols (with #define) which can later be reused in the program instead of magical numerical values. Due to the BASIC code structure which allows for no whitespace at all, I had to restrict symbols to not allow them to contain BASIC instructions names in them. (I may be able to lift the constraint in some ways, but ultimately IF A=HYPOTHENUSE THEN will still be a problem and be parsed as IF A=HYPO THEN USE THEN), but since this is case sensitive, you can still use defines in lowercase and keep the BASIC keywords in uppercase. To be discussed.

- Mix and match labels, auto-generated numbers and sections of code with numbers, as long as the combination results in increasing numbers we are good to go. The reason is that this allows people to progressively convert an existing BASIC program to use the new system.

- Labels can be followed by one or two values separated by a ":" separator. "+n" is used to define the increment, and "n" the new starting line.

- A magic symbol, "§" which is expanded to contain the current line number, can creatively be used to store the location of a function to call in a variable.

- A magic symbol, "~" which can be used to directly insert all these annoying CHR$ characters. PRINT "~CYELLOW~LBLINKING" (when followed by a upper case character, directly inserts the ESCAPE code followed by the value), but also to insert things like carriage return/line breaks in as string: I$=I$+"black dust~m~j")

I admit it's a bit cryptic, but probably not worse than the average Oric BASIC program full of CHR$(27);"C"

And finally the #optimize command that enables the stripping of all useless whitespace, removal of comments, and ultimately anything that could be removed without impacting the program behavior.

Hope that makes sense, hopefully that should be in the next version of the OSDK, to be released Soon(tm)