Skip to main content
6 events
when toggle format what by license comment
Jul 7, 2020 at 14:14 comment added TonyM Yep, the ZX BASIC string slicing was much better than the LEFT$/RIGHT$/MID$ burden in other BASICs, including the otherwise-elegant BBC BASIC. a$(TO 5) is the left 5 characters, a$(7 TO) is the everything from the 7th character onwards. Simple.
Jul 7, 2020 at 12:57 comment added Patrick Schlüter Thank you guys. It was my bad. Too much programming in D and I discovered the sinclair basic slicing only recently.
Jul 7, 2020 at 10:48 history edited occipita CC BY-SA 4.0
added 11 characters in body
Jul 7, 2020 at 10:46 comment added occipita @OmarL - just tried it and your memory of the syntax is correct, at least for the Spectrum version. (Have edited the example given to be correct as just verified)
Jul 7, 2020 at 8:47 comment added Omar and Lorraine At least in the 48k BASIC, string slicing involves the TO keyword. It's something like A$(10 TO 20). But I can't remember exactly. It's been a while.
Jul 7, 2020 at 6:57 history answered Patrick Schlüter CC BY-SA 4.0