On 1/4/23 6:47 PM, Ken Pettit wrote:
On 1/3/23 9:50 PM, John R. Hogerhuis wrote:


On Tue, Jan 3, 2023 at 9:24 PM Ken Pettit <petti...@gmail.com <mailto:petti...@gmail.com>> wrote:

    Hey John,

    Nice!  No way to make that a 1-liner huh?  ;-)

    Ken


Oops, I should have said converting this to a one liner is left as an exercise for the reader :-)


Okay, challenge accepted! Here is the one-liner version of John's M100 program (minus the BEEP ... I couldn't figure out how to get that to fit in the line limit).

10 DEFINTA-Z:A=255:DIMW(A):FORJ=128TOA:W(J)=1:NEXT:B=30481:C(0)=A:C(1)=239:FORD=32TOA:CLS:FORJ=1TO7:PRINTJ:NEXT:PRINT8;:FORI=2TO6+W(D):C=PEEK(B):B=B+1:FORJ=0TO7:L=CAND1:C=C\2:PRINT@J*40+I,CHR$(C(L));:NEXTJ,I:FORX=1TO1STEP0:IFINKEY$=""THENNEXTXELSENEXTD

Actually, if I remove the "DEFINTA-Z:" at the beginning, then I can get the BEEP to fit also, it will just run slightly slower:

10A=255:DIMW(A):FORJ=128TOA:W(J)=1:NEXT:B=30481:C(0)=A:C(1)=239:FORD=32TOA:CLS:FORJ=1TO7:PRINTJ:NEXT:PRINT8;:FORI=2TO6+W(D):C=PEEK(B):B=B+1:FORJ=0TO7:L=CAND1:C=C\2:PRINT@J*40+I,CHR$(C(L));:NEXTJ,I:FORX=1TO1STEP0:IFINKEY$=""THENNEXTXELSEBEEP:NEXTD

Ken

Reply via email to