Post AxbmGkKQRTmVWaPlT6 by agateau@mastodon.xyz
(DIR) More posts by agateau@mastodon.xyz
(DIR) Post #AxbiNmeNoAeuw6qkNs by neauoire@merveilles.town
2025-08-27T21:18:04Z
1 likes, 0 repeats
How do you indent your BASIC programs?
(DIR) Post #AxbimDeR4Tt5czWgIi by rafial@masto.hackers.town
2025-08-27T21:22:38Z
0 likes, 0 repeats
@neauoire historically the first, but the third seems nicest
(DIR) Post #AxbjG4zhp1jXSyiIwC by johntimaeus@infosec.exchange
2025-08-27T21:27:58Z
0 likes, 0 repeats
@neauoire I never had the screen space or memory for something like that.
(DIR) Post #AxbjQkNenseAig0GXY by msh@coales.co
2025-08-27T21:29:55Z
0 likes, 0 repeats
@neauoire I am not aware of any version of BASIC where the middle one is even possible because every BASIC I am aware of strips leading whitespace on all line numbers or labels, so the right one if the platform allows otherwise the left one
(DIR) Post #AxbjUS1yy7yGy3dCgi by mdreid@mastodon.social
2025-08-27T21:30:37Z
0 likes, 0 repeats
@neauoire Both types of indentation look weird to me. But that’s probably mostly to do with me learning BASIC on a 22 column display. :)
(DIR) Post #AxbkDTrD1eJLfA41WS by gureito@mastodon.gamedev.place
2025-08-27T21:38:40Z
0 likes, 0 repeats
@neauoire i'm with the classic left on this. was the same with my old fortran as well. for some reason, explicit line number and indentation don't really mix on my mind.
(DIR) Post #Axbljy24TDikTECPkO by suetanvil@freeradical.zone
2025-08-27T21:55:49Z
0 likes, 0 repeats
@neauoire I wrote a Ruby script to indent and otherwise tidy BASIC code for my contributions to https://github.com/coding-horror/basic-computer-games .
(DIR) Post #Axbm9R1doOahd98rnU by yngmar@social.tchncs.de
2025-08-27T22:00:20Z
0 likes, 0 repeats
@neauoire With a tab consisting of three spaces.
(DIR) Post #AxbmGkKQRTmVWaPlT6 by agateau@mastodon.xyz
2025-08-27T22:01:46Z
0 likes, 0 repeats
@neauoire I wrote code like the first one when I learned basic (there was no other choice...) nowadays I would pick the one on the right as I think it's easier to scan the line numbers if they are in one column.
(DIR) Post #AxbsWfX6dfbl0gJzqi by abortretryfail@mastodon.social
2025-08-27T23:11:51Z
0 likes, 0 repeats
@neauoire Only BASIC I do is on a Tandy with 40 column lines. No room to waste on indenting. 😁
(DIR) Post #Axbsj7AnhOTUD3p5GK by thgie@post.lurk.org
2025-08-27T23:14:07Z
0 likes, 0 repeats
@neauoire a lot of the basic code I looked at often tried to use the little screen estate they had as efficient as possible. No indentation and, if the dialect allowed, several commands per line. But if that is not an issue, I really like the third variant. The positional number acts as index and reading can be quickened when they line up. Meanwhile indenting the logics helps building up a mental mode
(DIR) Post #AxbyxclBeiyXxC90NM by pixelscience@mastodon.social
2025-08-28T00:23:58Z
0 likes, 0 repeats
@neauoire @joe You could indent BASIC!?
(DIR) Post #AxbzEfJ3RTWUm26xm4 by SpaceLifeForm@infosec.exchange
2025-08-28T00:27:03Z
0 likes, 0 repeats
@neauoire Never insert unneeded whitespace when using 300 baud.
(DIR) Post #Axc0U5U0V4MOG09UFk by nihongomaamaa@mastodon.ie
2025-08-28T00:41:02Z
0 likes, 0 repeats
@neauoire That's neat. I would definitely go for the third style in a modern BASIC. However, I doubt that I've programmed in BASIC since the C64. ISTR that you *could* use extra whitespace but I often didn't because it took up extra memory. Also pretty sure that I often used extra space to make DATA statements more readable, such as for sprite/font data.
(DIR) Post #AxcG32Dc7yP5a3bfGq by lfourrier@tooter.social
2025-08-28T03:35:15Z
0 likes, 0 repeats
@neauoire with GOTO going anywhere, which lines should be indented ? How to group logically related lines by indentation level if you can go to any line in a block ?
(DIR) Post #AxcG74WNVZxVseJBE8 by neauoire@merveilles.town
2025-08-28T03:36:05Z
0 likes, 0 repeats
@lfourrier I indent backward jumps only.https://wiki.xxiivv.com/site/basic
(DIR) Post #AxcGbrW1ueyUWNpMDg by lfourrier@tooter.social
2025-08-28T03:41:45Z
0 likes, 0 repeats
@neauoire @lfourrier how would you indent the fizz buzz sample from two days ago ?
(DIR) Post #AxcGm6A0Jpf6pxPEY4 by neauoire@merveilles.town
2025-08-28T03:43:32Z
0 likes, 0 repeats
@lfourrier like this I thinkhttps://paste.sr.ht/~rabbits/35685d0037040c3851d86cf77c3887d638d7ab37
(DIR) Post #AxcGyzhddgJmZeHsP2 by lfourrier@tooter.social
2025-08-28T03:45:51Z
0 likes, 0 repeats
@neauoire @lfourrier I was thinking of this one
(DIR) Post #AxcH1o7X9sQ5WLk0vI by neauoire@merveilles.town
2025-08-28T03:46:23Z
0 likes, 0 repeats
@lfourrier 2 to 7
(DIR) Post #AxcHSP5mJxp3iQbOcq by lfourrier@tooter.social
2025-08-28T03:51:13Z
0 likes, 0 repeats
@neauoire @lfourrier ok, quite logical.On 10 to 14, I think it could be interesting to have some marker on lines that are targets of goto
(DIR) Post #AxcHfHQc7ue9i8UItM by neauoire@merveilles.town
2025-08-28T03:53:31Z
0 likes, 0 repeats
@lfourrier yeah, I went back on the fizzbuzz design. I think that program wasn't a great design, and the trickiness of indentation is maybe a side-effect, compared to a nicer cleaner design:https://paste.sr.ht/~rabbits/f5934649c079ade94094b87ad31c4c1bf0ff6d05
(DIR) Post #AxcHq5A84TYwr1vbDU by lfourrier@tooter.social
2025-08-28T03:55:31Z
0 likes, 0 repeats
@neauoire @lfourrier much more usual design for modern developers
(DIR) Post #AxcUVqGd2YYCGoeBSi by goosey@mastodon.sdf.org
2025-08-28T06:17:19Z
0 likes, 0 repeats
@neauoire I write BASIC as style 1 but I have a prettyprinter that turns it into style 3
(DIR) Post #AxdtY4QY3ZkQmIPFKK by ddlyh@topspicy.social
2025-08-28T22:32:44Z
0 likes, 0 repeats
@neauoireNumber 3.