I often use the operator [] string index.
A long time ago I used a dialect of basic which had something similar, but it also included a range.
e.g. a$[2:5] would be characters 2-5. (=mid$(a$,3,4)).
For FreeBasic, it might be better to use the notation [firstcharacter,lastcharacter] e.g. a$[2,5]
Would this be a useful notation to add to freebasic?
There has been many times it would have been useful, and clearer than say if I wanted the substring starting at character c and ending at character d, it would be a$[c,d] rather than mid$(a$,c+1,d-c+1) especially when used in a more complex expression.
p.s.
I only use fblite, so please, please make the new option available in fblite.
Last edit: Jim giordano 2020-02-15