Tabulator in IDE

Here you can suggest additions and modifications to BB4W or BBCSDL
Ivan
Posts: 33
Joined: Tue 07 May 2019, 16:47

Tabulator in IDE

Post by Ivan »

I really miss TAB/SHIFT TAB function in the editor...
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. Project for the last three month: 3D-drawing program (currently 950 lines).

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Tabulator in IDE

Post by RichardRussell »

Ivan wrote:
Tue 10 Mar 2020, 20:24
I really miss TAB/SHIFT TAB function in the editor...
Remember that a BBC BASIC program is not 'plain text', it uses a custom tokenised format in which keywords are represented by single bytes and line numbers have a special binary representation, etc. Whereas in a plain-text file you could insert a TAB character (ASCII 0x09) you cannot insert a TAB character into a BBC BASIC program - not least because the character 0x09 is the token for the keyword SYS!

So it's not clear to me what TAB could usefully do in a BBC BASIC program editor. As for Shift+TAB, in Microsoft's Notepad - which as far as I am concerned is the 'reference' text editor - it seems to do exactly the same as TAB (if there is a difference I'd be interested to know what it is).

Since the IDEs supplied with BBC BASIC for SDL 2.0 are themselves written in BBC BASIC you are free to adapt them in any way you like to suit your personal preferences (apart from the inconvenience of having to repeat your modifications when a new version is released). If you think a modification might be of general interest I am happy to consider it for incorporation in the distributed version(s).
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

User avatar
hellomike
Posts: 76
Joined: Sat 09 Jun 2018, 09:47

Re: Tabulator in IDE

Post by hellomike »

To do what exactly?
Lines of code can't contain tabs (ASCII 09) and in string literals it is awkward to have CTRL code's inserted like this.

Mike

Ivan
Posts: 33
Joined: Tue 07 May 2019, 16:47

Re: Tabulator in IDE

Post by Ivan »

Maybe it’s only me who comments on almost every line and want space after so I can separate code and comment for clearer view. I don't know the "machinery" of BBC Basic, but have learned that I can use shift+tab on the above or below to fast "tabulate" to the same column. Otherwise I can fill the gap with spacebar and that gave me the idea to use tabulator. E.g. One tab = 8 x CHR$(32).

You have mentioned SDL several times and I did not understand what SDL means other than cross platform...

Comal_tab_indent_ect.jpg
Comal_tab_indent_ect.jpg (172.66 KiB) Viewed 270 times
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. Project for the last three month: 3D-drawing program (currently 950 lines).

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Tabulator in IDE

Post by RichardRussell »

Ivan wrote:
Wed 11 Mar 2020, 15:01
that gave me the idea to use tabulator. E.g. One tab = 8 x CHR$(32).
If you simply want to configure TAB to output 8 spaces that's straightforward in BBC BASIC for Windows:
  1. From the Utilities menu select 'Macro Recorder' (slot 2, usually).
  2. Select 'Tab' in the set of radiobuttons.
  3. Click on 'Record'.
  4. Press the space bar 8 times.
  5. Click on 'Stop'.
  6. Dismiss the Macro Recorder.
It's easy to modify BBCSDL to do the same, if it's generally thought to be useful (although there's a possible race hazard which could cause Tab to be recognised as Ctrl+I which is the keyboard shortcut for Insert File).
You have mentioned SDL several times and I did not understand what SDL means other than cross platform...
SDL is the Simple DirectMedia Layer (Google would have told you).
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

Ivan
Posts: 33
Joined: Tue 07 May 2019, 16:47

Re: Tabulator in IDE

Post by Ivan »

Thanks for hint.

Is BBCSDL the future for you and not BBC Basic?

"(Google would have told you)."

Ok - you brings in a search engine with a bad morale.

When I use search engines I prefer duckduckgo's because their privacy policy!

https://duckduckgo.com/

And absolutely not Google's sniffing and add policy!
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. Project for the last three month: 3D-drawing program (currently 950 lines).

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Tabulator in IDE

Post by RichardRussell »

Ivan wrote:
Thu 12 Mar 2020, 08:25
Is BBCSDL the future for you and not BBC Basic?
Sadly the "future" for me is uncertain because of my failing health. But active development of BBC BASIC for Windows ceased several years ago, since when it has been in a maintenence phase, whereas active development of BBC BASIC for SDL 2.0 is continuing.

But I am very much of the opinion that stability is more important than being actively developed (after all BBC BASIC stems from a time when it was programmed into ROM and couldn't be changed!) so I don't see being in a maintenance phase as necessarily a bad thing.

Nor do I consider BB4W and BBCSDL to be 'competitive'. There is an overlap, when running on Windows, but there are things that BB4W can do that BBCSDL cannot, and there are things that BBCSDL can do which BB4W cannot, so they are complementary.
When I use search engines I prefer duckduckgo's because their privacy policy!
Google is just too good! I understand your concerns, but as far as privacy is concerned I have nothing to hide, and I use an ad-blocker.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

User avatar
hellomike
Posts: 76
Joined: Sat 09 Jun 2018, 09:47

Re: Tabulator in IDE

Post by hellomike »

And simply because of duckduckgo's advertises with "We don’t store your personal information. Ever." you believe them? Well, yes, I know it is off topic but just saying.....

Ivan
Posts: 33
Joined: Tue 07 May 2019, 16:47

Re: Tabulator in IDE

Post by Ivan »

Richard: Sorry about your health.

"I know it is off topic but just saying"

You have a point especially when I think of the slogan "Don't be evel".

But after I dropped Google I am remarkble free of adds and internet noise!

Duckduckgo + AddBlocker + Tor browser are very good together, but not all sites will accept that constallation.

To many says I don't have anythink to hide - thats the bread and butter for adds companies.
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. Project for the last three month: 3D-drawing program (currently 950 lines).

RichardRussell
Posts: 232
Joined: Tue 15 Oct 2019, 09:10

Re: Tabulator in IDE

Post by RichardRussell »

RichardRussell wrote:
Wed 11 Mar 2020, 16:57
If you simply want to configure TAB to output 8 spaces that's straightforward in BBC BASIC for Windows
I have also been reminded that BBC BASIC for Windows comes with a utility SETTAB.BBC (in the EXAMPLES\TOOLS folder) which configures the Tab key to move to a specific column.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.