String length: Difference between revisions
Content added Content deleted
m (Fix Brainf*** header) |
(Use proper bullet syntax for Brainf*** explanations) |
||
Line 759: | Line 759: | ||
===Byte Length=== |
===Byte Length=== |
||
There are several limitations Brainf*** has that influence this solution: |
There are several limitations Brainf*** has that influence this solution: |
||
*Brainf*** only supports 8-bit numbers in canonical implementations, so it only supports strings of length below 255. |
|||
*The rule of thumb in Brainf*** when reading a string is to always store exactly one byte, no matter how much bytes a character represents. That's why this solution is a strictly ByteLength one. |
|||
*No way to pass anything to Brainf*** but giving the arguments as input. That's why this program reads a string and outputs the number of bytes in it. |
|||
[[https://esolangs.org/wiki/Brainfuck_algorithms#Print_value_of_cell_x_as_number_for_ANY_sized_cell_.28eg_8bit dot 2C_100000bit_etc.29]] is used to print the number from memory. |
[[https://esolangs.org/wiki/Brainfuck_algorithms#Print_value_of_cell_x_as_number_for_ANY_sized_cell_.28eg_8bit dot 2C_100000bit_etc.29]] is used to print the number from memory. |