' ****** START INCLUDE UrlKey$(key$) ****** FUNCTION UrlKey$(key$) UrlKey$ = "" keyPos% = INSTR( UCASE$(UrlQueryString$), [ UCASE$(key$) + "=" ] ) IF keyPos% THEN step1$ = RIGHT$( UrlQueryString$, [ LEN(UrlQueryString$) - keyPos% - LEN(key$) ] ) step2% = INSTR(step1$, "&") UrlKey$ = IFF( step2%, [ LEFT$(step1$, step2% - 1 ) ], step1$) END IF END FUNCTION ' ****** END INCLUDE UrlKey$(key$) ****** ' 🟠🟠🟠ABOUT THIS PROGRAM ' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.12.16.16.28]) on 2024.03.12 at 00:44 (Coordinated Universal Time) ' Program by Charlie Veniot ' A digital clock, the digits drawn using the built-in 8x8 fonts as a template ' Demonstrates the use of: URLKEY$ (an include library), NVL$, _GETCHR$, _LETCHR$ ' To use default colors: https://basicanywheremachine.neocities.org/sample_programs/LED%20Clock.prod.run.html ' To specify custom outer and inner colors (example): https://basicanywheremachine.neocities.org/sample_programs/LED%20Clock.prod.run?ocolor=20&icolor=50 ' Available colors (0-63) for color mode "p256": https://basicanywheremachine.neocities.org/bam-progreference?target=Bookmarks%3A%3ASCREEN%20Modes#Home ' 🟠🟠🟠DECLARATIONS DECLARE SUB printat(x%,y%,s$,w%,h%) LET ocolor% = NVL$((URLKEY$("ocolor")),53) LET icolor% = NVL$((URLKEY$("icolor")),63) ' 🟠🟠🟠MAIN PROGRAM DO SCREEN _NEWIMAGE(680,100,17) CALL printat(19,19,time$,10,8) _DELAY 0.06 CLS LOOP END ' 🟠🟠🟠SUBROUTINES SUB printat(x%,y%,s$,w%,h%) DIM c$, r%, c% DIM xinc% = 0 WHILE s$ <> "" LET c$ = _GETCHR$( ASC( LEFT$( s$, 1 ) ) ) FOR r% = 0 TO 7 : FOR c% = 0 TO 7 IF MID$( c$, r% * 8 + c% + 1, 1 ) = "X" THEN _ LINE (x% + c% * w% + xinc% * 8, y% +r% * h% ) TO ( x% + c% * w% + xinc% * 8 + w%, y% + r% * h% + h% ), ocolor%, BF : _ LINE (x% + c% * w% + xinc% * 8 + 2, y% +r% * h% + 3 ) TO ( x% + c% * w% + xinc% * 8 + w% - 3, y% + r% * h% + h% - 2 ), icolor%, BF NEXT c%, r% LET s$ = RIGHT$( s$, LEN( s$ ) - 1 ) LET xinc% = xinc% + w% WEND END SUB