+Vorticon Posted June 4, 2019 Share Posted June 4, 2019 Hi. A new creative programming challenge has launched that should be within the reach of most here. Only 10 lines of TI BASIC or Extended Basic (any flavor)! Details here: http://atariage.com/forums/topic/291836-official-10-liner-program-competition-thread/ Looking forward to what we can come up with! 6 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted June 6, 2019 Author Share Posted June 6, 2019 Guys, please make sure to post your official entries on the submission thread so they can be included in the final poll and allow the group to test play all of them. It's hard to keep track of scattered posts otherwise. Here's the link again: http://atariage.com/forums/topic/291836-official-10-liner-program-competition-thread/ 2 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted July 15, 2019 Author Share Posted July 15, 2019 15 days to go folks! Plenty of time to come up with an entry Quote Link to comment Share on other sites More sharing options...
kl99 Posted July 18, 2019 Share Posted July 18, 2019 Working intensive on my entry. Lost some time because of a one-week sickness. In case you try to squeeze every byte into your lines, you are able to figure out how many bytes are free in each line by adding as many "!" characters as the line will still fit without throwing "* Line Too Long". This will show you how many tokenized bytes are still available in each of your lines. And if you have space in one line but are low on bytes in another, you can replace a hardcoded number by a numeric variable. 2 CALL CLEAR :: CALL CHAR(100,"1234567890123456789012345678901234567890123456789012345678901234",R,"1234567890123456789012345678901234567890123456789012345678901234") --> * LINE TOO LONG But this fits: 1 Q=100 :: R=Q+4 2 CALL CLEAR :: CALL CHAR(Q,"1234567890123456789012345678901234567890123456789012345678901234",R,"1234567890123456789012345678901234567890123456789012345678901234") Also you can skip remaining zeros on Character Definitions like this 1 CALL CHAR(33,"0") defines the Character 33 as completely empty. 3 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted July 18, 2019 Share Posted July 18, 2019 You can actually do this: CALL CHAR(33,"") The "LINE TOO LONG" problem is also affected by tokenizable commands. For instance, CALL is tokenized but HCHAR is not. Once you get around the editor line entry limitation (for instance, using Notepad++ and Classic99 "PasteXB" function,) playing around a little can help you squeeze more into a single line. In XB line 10 is 21 bytes long, and line 20 is 7 bytes long. 10 CALL HCHAR(1,1,32,30) 20 PRINT A$ Using shorter line numbers and variable names also helps as both are stored as text. 10 NUMBER=123.45 ! Variable is six characters, the number is six characters 20 GOTO 32768 ! Line number is five characters And, of course, remarks (in both REM and ! statements) are stored as text. I have swapped some some statements between lines to make them fit without triggering "LINE TOO LONG". Using short functions like RPT$() or TAB() can help with PRINT or DISPLAY-AT statements. As an example, I can paste the following into Classic99 without over-flowing: 1DIM G(19,23)::CALL SCREEN(2)::READ A$,B$::CALL CHAR(96,A$,128,A$,136,A$)::CALL CHAR(43,B$)::FOR I=2 TO 14::CALL COLOR(I,16,2-3*(I=13)-9*(I=14))::NEXT I 2CALL CLEAR::DISPLAY AT(1,2):"QI\//";TAB(32);"/\\B"::CALL HCHAR(3,4,98,24)::CALL HCHAR(24,4,99,24)::CALL VCHAR(4,3,97,20)::CALL VCHAR(4,28,96,20) Both lines are packed with work and exceed the editor buffer, but do not exceed the line limit after tokenization (crunching,) but just moving one statement to the other line will cause "LINE TOO LONG". I also tried playing with using RPT$() in the character definitions, but sacrificing one line to a DATA statement just worked out better. 1 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted July 18, 2019 Share Posted July 18, 2019 Oh, and the statement separators :: also count as a single byte when crunched. Quote Link to comment Share on other sites More sharing options...
RXB Posted July 18, 2019 Share Posted July 18, 2019 (edited) Your line: CALL VCHAR(4,3,97,20)::CALL VCHAR(4,28,96,20) In RXB can be CALL VCHAR(4,3,97,20,4,28,96,20) Would save you some bytes used in token buffer. (Thus not using :: or CALL or VCHAR again. Edited July 18, 2019 by RXB 3 2 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted August 1, 2019 Author Share Posted August 1, 2019 The contest has now ended and voting can begin. Please take the time to review the entries and vote here: Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted August 6, 2019 Author Share Posted August 6, 2019 Please don't forget to vote on your favorite entries! 11 days to go till voting closes. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted August 13, 2019 Author Share Posted August 13, 2019 4 days to go! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.