I'm looking for a S*BASIC app, possibly by Tim Swenson!

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by NormanDunbar »

No worries Tim, thanks.

I did read the manual, honest, so I was aware of the difference between ** and ##. If I release an S*BASIC source file into the wild, I'd be releasing the BAS file and not SSB as people might not have SSB or want to use it.

For me, it's fine.


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by swensont »

Norman,

Why not release both _SSB and _BAS. I would call _SSB the source code and _BAS the "runtime" :-)

The purpose of SSB was to make code that is easy to use (and add a few per-processor nice-to-haves). Even those that don't have SSB, the _SSB code would be easier to read and understand.

Tim


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by NormanDunbar »

Hi Tim,

Yes, that's a thought for consideration. :)

I'm trying to recompile SSB 2.7.2 and I'm having a wee problem in that no errors are raised, but the new version never creates the output _bas file, but there are never any errors!

Turbo 4.1.5 if I remember correctly. I assume there's no special handling required, just a straight SSB to bas, load the bas file and charge?


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by NormanDunbar »

Ok Tim, panic over, I found the problem.

I made some changes to ssb272_ssb, ssblang_ssb and ssbpass2 to :

* Introduce a new environment variable, SSBIGNORE_BLANKS, to allow blank lines to be ignored (the default) or converted to ":" lines.
* Allow blank lines, depending on the SSBIGNORE_BLANKS environment variable, if Y or y then blanks are ignored, else converted to a line number with a colon. (sorry!)
* Fix the indentation on REMark lines.
* Remove the additional spaces on REMark lines. There was one before and one after the REMark that don't appear to be needed.
* Allow "**" anywhere in a line, to be converted to REMarks. (This is where the problem was introduced!)
* Changed the version number to 2.7.2b, in the sources and in the language file.


So, I ran the current ssb272_exe against the new source files. That created a new ssb272b_exe file. So far so good.

I then ran ssb272b_exe against the new source files again, so it compiled itself, and here, the output was broken. It turned out that in ssbpass2_ssb, there was test explicitly for "**" to convert to REMarks. However, when ssb272_exe was run, it wasn't looking for "**" anywhere other than at the start of a line, but ssb272b_exe was looking all through the line. So the generated basic file was testing for "REMark" and not for "**". Oops!

I changed the ssbpass2_ssb file to search for CHR$(42) & CHR$(42) as was being done elsewhere in the same file.

I have managed to compile a new version of ssb272b_exe which was compiled first by ssb272_exe then by the generated ssb272b_exe, so that, once more, it has successfully compiled itself. And so far, it seems to work!

I shall, of course, upload the sources when I get a chance. MrsD is home with the dog and apparently, I have to "get a life" and leave my laptop alone! I have no idea what a "life" is! ;)


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by NormanDunbar »

Here are the sources and updated docs for SSB 2.7.2b as discussed yesterday.
StructuredSuperBasic_272b.zip
(117.95 KiB) Downloaded 77 times
Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by swensont »

Norman,

I see you found the issues that I found when getting SSB to "compile" itself. Glad to see the updates and that you have modified it to work as you want.

Tim Swenson


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by NormanDunbar »

Hi Tim
swensont wrote:Norman,

I see you found the issues that I found when getting SSB to "compile" itself. Glad to see the updates and that you have modified it to work as you want.

Tim Swenson
Yes indeed, I found one issue, and I seem to have fixed it. The manual said that SSB must be able to compile itself, so I made sure that my changes didn't break that rule. They did, so I needed to fix that. Turned out to be easily done thanks to you well written SSB files. Thank you, I do enjoy well written source.

I am enjoying using your software, so thanks again for creating an excellent application.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by Derek_Stewart »

Hi,

I have been using SSB sunce it first appeared in the article in QL Hackers Journal #1, Jan-1990, it was one of those pieces of software that change the way I looked at programming. Having started with Fortran, Padcal, then to Basic...

I always thought Superbasic could have numberless programmes, as I do not like statements that have use line numbers as a reference.

I asked Laurence Reeves if Minerva could use numberless Superbasic programmes, which he did not want to alter the way Minetva worked, so SSB was the solution I was looking for. Coupled with MicroEmacs and Syntax Highlighting, made a nice structured programming environment.


Regards,

Derek
User avatar
badaman
Over Heated PSU
Posts: 133
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by badaman »

Hello. I am getting to know this program, and I see that it does not yet have support in Spanish. I have taken the liberty of doing the translation, which I hope can be of help.

I have used the S in Spanish to refer to it, but the correct thing would be to use ES.

The translation:

Code: Select all

IF d_lang$ = "S"
   lngarray$(1) = "FILTRO SUPERBASIC ESTRUCTURADO"
   lngarray$(2) = "       Versi–n 2.7.2b"
   lngarray$(3) = " Por: Timothy Swenson"
   lngarray$(4) = "Introduzca el archivo de entrada: ("
   lngarray$(5) = "ERROR - Archivo en uso"
   lngarray$(6) = "ERROR - El archivo no existe"
   lngarray$(7) = "ERROR - nombre de archivo incorrecto"
   lngarray$(8) = "Introduzca el archivo de salida: (Por defecto "
   lngarray$(9) = "ERROR - El archivo existe"
   lngarray$(10) = "Confirme para borrar (Y/N)"
   lngarray$(11) = "Introduzca el n™mero de l“nea inicial: (Por defecto "
   lngarray$(12) = "ERROR - Debe introducir un n™mero"
   lngarray$(13) = "ERROR - El 2º argumento no es un n™mero vŒlido"
   lngarray$(14) = "ERROR - El archivo de salida existe"
   lngarray$(15) = "ERROR - Nombre de archivo incorrecto: Archivo de salida"
   lngarray$(16) = "ERROR - Archivo de salida en uso"
   lngarray$(17) = "Paso 1"
   lngarray$(18) = "Paso 2"
   lngarray$(19) = "Programa listo"
   lngarray$(20) = "Pulse una tecla"
   lngarray$(21) = "ERROR FATAL - Nombre incorrecto "
   lngarray$(22) = "ERROR FATAL - Archivo no encontrado "
   lngarray$(23) = "ERROR FATAL - Archivo en uso "
   lngarray$(24) = "ERROR FATAL - Fin del archivo encontrado mientras se buscaba \"
   lngarray$(25) = "Archivo : "
   lngarray$(26) = "ERROR FATAL - Etiqueta"
   lngarray$(27) = " Demasiado largo"
   lngarray$(28) = "NUMERO DE LINEA: "
   lngarray$(29) = " EN EL ARCHIVO: "
   lngarray$(30) = "ERROR FATAL - Demasiadas etiquetas"
   lngarray$(31) = "ERROR FATAL - DEFINE "
   lngarray$(32) = " No encontrado"
   lngarray$(33) = "ERROR FATAL - Demasiados DEFINEs"
   lngarray$(34) = "ERROR FATAL - Fin del archivo encontrado antes de #ENDIF"
   lngarray$(35) = "ERROR FATAL - Etiqueta "
   lngarray$(36) = "Introduzca el incremento para los n™meros de l“nea: (Por defecto "
END IF
Note: Accented characters are not displayed. for example "números" show here as "nmeros", but, they are copied fine if you use Select All and copy the text.

Some notes to keep in mind:

In Spanish, we use S/N (Sí/No) for Y/N (Yes/No). Perhaps this is something that should be taken into account in different locations.

It would be interesting if the _ssb to _bas converter also reviewed and converted special characters, for example á à ö ñ... When working with an editor in Linux or another system, and entering text strings, they appear in SuperBASIC with a set of equivalent characters in UTF-8.

I find the improvements introduced in version 272b very successful. I wonder if this proposal and the improvements will be available for official download.

Please let me know if I can help you further.
Last edited by badaman on Tue Mar 05, 2024 6:49 pm, edited 1 time in total.


User avatar
badaman
Over Heated PSU
Posts: 133
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: I'm looking for a S*BASIC app, possibly by Tim Swenson!

Post by badaman »

Edited the ssblang_ssb file to include the Spanish text. Attached.
Attachments
ssblang_ssb.zip
(3.15 KiB) Downloaded 17 times


Post Reply