toddtmw Posted July 13, 2019 Share Posted July 13, 2019 Okay. I know I’ve programmed in many many (too many to count) languages since my Atari days, but I simply do not recall how poorly Atari concatenates strings. Is there really no A$=B$+C$ type functionality in Atari basic? Is the “best” approach really this clunky?: A$=B$ A$(LEN(A$+1)=C$ I do do not recall having to code this “badly” BITD... Quote Link to comment Share on other sites More sharing options...
Preppie Posted July 13, 2019 Share Posted July 13, 2019 (edited) Atari basic is a bit clunky with strings, although I believe Microsoft Basic can deal with addition of strings (never used it so can't confirm personally) I've just started using FastBasic and would highly recommend it, although it still has the same problem with normal strings. However, you can have variable strings with a max length of 255 which you can perform operations on. Edited July 13, 2019 by Preppie Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted July 13, 2019 Share Posted July 13, 2019 Yes, really that complicated. Except that you have a bracket missing. A$(LEN(A$)+1)=B$ 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 14, 2019 Share Posted July 14, 2019 parenthesis 3 Quote Link to comment Share on other sites More sharing options...
toddtmw Posted July 14, 2019 Author Share Posted July 14, 2019 Code Nazi Grammar Nazi ? I must not have done much string handling in my Atari days. Either that, or I blocked it out after I found other languages that did it so much better.... 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted July 17, 2019 Share Posted July 17, 2019 Hi! On 7/13/2019 at 12:33 PM, Preppie said: Atari basic is a bit clunky with strings, although I believe Microsoft Basic can deal with addition of strings (never used it so can't confirm personally) I've just started using FastBasic and would highly recommend it, although it still has the same problem with normal strings. However, you can have variable strings with a max length of 255 which you can perform operations on. On FastBasic, you can do A$ =+ B$ to copy B$ at the end of A$. I did not implement the easier to read " A$ = A$ + B$ " because it would need a temporary string (being slower), and normally you need just to concatenate and not to create an arbitrary string. Have fun! 4 Quote Link to comment Share on other sites More sharing options...
Kylev Posted September 7, 2019 Share Posted September 7, 2019 Toddtmw, Perhaps back in the day you did something like this (assuming your string was large enough to support it and you already knew how long A$ was): A$(x,x)=B$, where X is the index of the last character in A$. Doesn't seem so clunky to me. Just requires more direct knowledge of how your strings are configured. Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted September 7, 2019 Share Posted September 7, 2019 (edited) Is B$ a single character in length? Edited September 7, 2019 by Kyle22 Clarity. Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 7, 2019 Share Posted September 7, 2019 It all seems clunky until you realise the limitations of orthodox string handling like 256 character limit and inability to do things like memory moves and using strings for playfield or PM graphics. 1 Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted September 7, 2019 Share Posted September 7, 2019 (edited) X=USR(ADR(ML$), [passed data], [passed data]. There is no 256 character limit to most Atari BASICs. Edited September 7, 2019 by Kyle22 F**k it was one character from perfection :) 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.