08-15-2024, 06:06 PM
You know I always want write clean, efficent code, but my muddled brain always ends making thing way more complicated and I feature creep.
I start out thinking about doing this:
I end up doing this.
I start out thinking about doing this:
Code: (Select All)
FUNCTION GetMonth$(month)
SELECT CASE month
CASE 1: GetMonth$ = "January"
...
END FUNCTION
I end up doing this.
Code: (Select All)
month$ = "JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember."
DO
INPUT "Input a number between 1 and 12"; n%
i% = 1: m$ = "": DO
n% = n% + (INSTR("JFMASOND.", MID$(month$, i%, 1)) > 0)
m$ = _TRIM$(m$ + CHR$((ASC(MID$(month$, i%, 1)) * -(n% = 0)) + (32 * -(n% <> 0))))
i% = i% + 1: LOOP WHILE i% < LEN(month$) AND n% >= 0
PRINT m$
LOOP
2D physics engine https://github.com/mechatronic3000/fzxNGN
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool