12-21-2025, 12:01 PM
My 15 minutes of wasted downtime 

Code: (Select All)
CONST s = "++++++++,-----,------------,------------,---------------,,+++++++++++++++++++++++,---------------,------------------,------------,----"
CONST n = _CEIL(_PI * 10)
DIM AS INTEGER sl, sl2, i
DIM c AS STRING * 1
sl = LEN(s)
i = 0
WHILE sl > 0
sl2 = sl
c = MID$(s, i, 1)
IF c = "+" THEN
WHILE MID$(s, i, 1) = "+"
sl = sl - 1
i = i + 1
WEND
PRINT CHR$(sl2 - sl + _SHL(n, 1));
ELSEIF c$ = "-" THEN
WHILE MID$(s, i, 1) = "-"
sl = sl - 1
i = i + 1
WEND
PRINT CHR$(sl2 - sl + _SHL(n, 1) + n);
ELSE
PRINT CHR$(n);
sl = sl - 1
i = i + 1
END IF
WEND
