Back
Close

BrainFuck part 13 - Funky output

DPAmar
1,602 views

Text modifiers

Now, let's see all the text modifiers

  • Reset : code 0
  • Bold : code 1
  • Dim : code 2
  • Underlined : code 4
  • Blink : code 5
  • Highlighted : code 7
  • Invisible : code 8

Let's start

  • Memory: empty
  • Cursor: first cell
  • Input: any

Process

  • For each effect
    • Print escape sequence
    • Print effect name
  • Loop

Code

+++++++++[->+++>++++++++++>+++++>++++++++++++>+<<<<<] generate escape sequence
>>+>+++>+>+>>++++++++[-<++++++>]<                       ** part 2 **
+<<<<<.>.>>>>.<<.>>>+++++++++++[->++++++>++           for 1: print Bold
++++++++<<]>.>+.---.--------.<<<<.                      ** part 2 **
<<<<.>.>.>.                                           reset style
>>+<<<<<.>.>>>>.<<.>>>>++.>+++++.++++.<<<<.           for 2: print Dim
<<<<.>.>.>.                                           reset style
>>++<<<<<.>.>>>>.<<.>>>++++[->++++<]>+.>+.---------   for 4: print
-.+.+++++++++++++.------.---.+++++.---------.-.<<<<.     Underlined
<<<<.>.>.>.                                           reset style
>>+<<<<<.>.>>>>.<<.>>>++++[->-----<]>+.>              for 5: print Blink
++++++++.---.+++++.---.<<<<.                            ** part 2 **
<<<<.>.>.>.                                           reset style
>>++<<<<<.>.>>>>.<<.>>>>++++++.>--.--.+.++++          for 7: print Highlight
.---.--.+.++++++++++++.<<<<                             ** part 2 **.
<<<<.>.>.>.                                           reset style
>>+<<<<<.>.>>>>.<<.>>>>+.>------.++++++++.            for 8: print Invisible
-------------.++++++++++.----------.------              ** part 2 **
-.++++++++++.-------.<<<<.                              ** part 3 **
<<<<.>.>.>.                                           reset style
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants