« first day (18 days earlier)      last day (25 days later) » 

4:49 AM
@steenbergh Um. ;^)
@EriktheOutgolfer There are LEFT$ and RIGHT$ for substrings at the beginning and end of the string respectively. AFAIK, MID$ is the only way to get substrings in the middle of the string. However, I did just discover that QB64 has an extension to the ASC function where you can do ASC(s$,i) and get the ASCII code of the ith character of s$. Could be useful.
 
5:45 AM
@ASCII-only That sounds interesting. You should sandbox it.
 
i would have already if i wasn't super lazy >_>
 
The QBasic-themed challenge I've been thinking about would have something to do with PLAY strings--either compressing them to the shortest equivalent form (which would be scored as ) or perhaps rewriting them in some kind of standardized form (which would probably be regular ).
But I haven't PLAYed around (sorry) with the idea enough to know what kind of possibilities there are for shortening.
 
@DLosc ah. yes, that would be a good idea too
 
 
4 hours later…
9:30 AM
@DLosc hm, looks like LEFT$ and RIGHT$ aren't exactly what I want (indexing)...not using QB64 but QBasic 1.1
and no, QBasic 1.1 doesn't have that ASC$ extension :P
 
 
10 hours later…
8:00 PM
@EriktheOutgolfer Did you have problems with single-line IF ... THEN ... ELSE before?
 
I, uh, think so, but now I don't
@DLosc what a weird function SPC is
I mean, how is it a function when it only works in a PRINT statement?
also, it's not SPC$...
 
Yeah, beats me. Maybe it's better to think of it as part of the syntax of PRINT.
See also TAB.
 
hm, maybe human error in the docs? :P
I'm not sure I can contact Microsoft or anybody else regarding that anymore...
 
And see also SPACE$, which is a function that actually returns a string of spaces.
 
duh :/
yeah, I think SPC/TAB should be considered syntax elements of PRINT, not functions
and...how does SPC even make sense? yay to alternatives that work in specific cases?
 
8:17 PM
Yeah--near as I can tell, SPC does the same thing as SPACE$, except it's golfier and you can only use it in a PRINT statement.
 
also, have you found out why POS takes an expression as an argument?
like, there are not many column positions the cursor can be at the same time, are there? ;)
 
@EriktheOutgolfer QB64's help file says, "The value in parenthesis [sic] is normally 0, but any numerical value or variable could be used for compatibility with Basic." So it sounds like it's a vestigial feature from earlier BASIC dialects. Maybe they had multiple cursors?
 
QB1.1's says nothing
:/
 
Yeah, I've noticed that QB64's help file is more... helpful... than actual QBasic's.
 
 
1 hour later…
9:33 PM
hm, what if I did this in QBasic...
 
@EriktheOutgolfer I found the question rather confusing, but if you want to, then go for it!
 
you mean confusing as in that it turns solving it in QBasic is confusing or that it is unclear?
 
The spec is hard to follow.
 
10:07 PM
 
10:20 PM
... And put TAB to good use. (Although I could have used LOCATE instead for the same number of bytes.)
 

« first day (18 days earlier)      last day (25 days later) »