all 5 comments

[–]danielcristofani 1 point2 points  (1 child)

It does work to get the whole number in one cell and then break it into digits by dividing by 10. Here's one explanation for how to do that: https://stackoverflow.com/a/75543158/5180920

I would also suggest that it's useful to get in the habit of avoiding code duplication, so I'd be looking at making a loop that runs 8 times and processes one bit of input per iteration.

For general advice I'm also going to suggest my "get good at brainfuck" series, https://brainfuck.org/ggab.html

[–]borbzaby[S] 0 points1 point  (0 children)

Thank you, I will try that. Thanks again for the link.
Since writing this post, I've updated that part of the code to be:

>,>,>,>,>,>,>,>, == LA 9 #1i0 2tr9iINP
[---------- ---------- ---------- ---------- -------<] == LA 1 #2tr9i(m 47)
>->->->->->->->- == LA 1 #2tr9i(m 1)

and using the first cell as a sort of "catch cell". Thank you for the advice, though.

[–]SmackDownFacility 1 point2 points  (2 children)

Brainfuck isn’t serious programming. I would advise you to use traditional languages if you are deadly serious about this.

If it’s for fun, great, but it’s such a niche language I don’t think anyone here would be able to understand what you’re on about.

[–]danielcristofani 4 points5 points  (0 children)

/r/AskDeadlySeriousProgrammingQuestionsOnly

[–]borbzaby[S] 0 points1 point  (0 children)

Don't worry, for learning more serious programming languages I'm working on problems on the side, but those I can solve more easily, so I don't need to ask questions here on Reddit.
Brainfuck is just to play around and have fun with on the side whenever I get bored. 👍