From d422b791f2b139c3b7c46cd9eb1a858827db40d6 Mon Sep 17 00:00:00 2001 From: DiamondNether90 Date: Mon, 15 Sep 2025 10:07:24 +1000 Subject: [PATCH] Initial Commit --- main.bf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 main.bf diff --git a/main.bf b/main.bf new file mode 100644 index 0000000..5e061e6 --- /dev/null +++ b/main.bf @@ -0,0 +1,30 @@ +[All data is stored in chunks of 2 bytes/cells: the first cell is the type and the second cell is the data. + +For example: The integer 27 would be stored as | 1 | 27 | 0 | 0 |. Note the double zero at +the end of the data.] + +# Get the first input by the user and check its type +,[------------------------------------------------------------------------------------------------------------------- +$$$ Cells: | subtract $input 115 | +[ If $input !== 's' +++++[ If $input !== 'o' + +] +>+<[>-]>[ If $input === 'o' + $$$ Cells: | 0 | (1) | ~~~~ | data + +] + +] +>+<[>-]>[ If $input === 's' (direct translation: set up else flag; if subtract $input s:ascii !== 0 remove else flag) + $$$ Cells: | 0 | (1) | + Actual Data starts at cell #10: go to cell 10 then continue to next un + >>>>>>>>>>>[[>>]>>]<[-]---------- Subtract 10 to calibrate loop + [++++++++++>[-]+++>, Start loop; add 10 (to undo the end of loop and add data) + ---------- Check if input is 10 (newline) + ] +]<[-] +If $input = s : $$$ | 0 | 1 | ~~~~ | 3 | char1 | 3 | char2 | ~~~~ | 3 | charlast | (0) | 0 | +If $input != s: $$$ | subtract $input 115 | 0 | (0) | +Realign Cursor +<[[[<]<]>[<]>[<]>[<]>[<]>[<]>[<]>[<]>[<]>[<]>[<]<<]<<<<<<<<[-]<,] \ No newline at end of file