LB Booster
Programming >> Compatibility with LB4 >> mid$(
http://lbb.conforums.com/index.cgi?board=compatibility&action=display&num=1477848155

mid$(
Post by Alincon on Oct 30th, 2016, 5:22pm

I was surprised that this worked. I don't see it described in the help file or other LBB documentation. Did I miss previous discussions on this?

r.m.

Code:
    a$ = "CCCCC"
    mid$(a$,3,1) = "X"
    notice a$   ' prints "CCXCC"
    wait
 

Re: mid$(
Post by Richard Russell on Oct 30th, 2016, 6:05pm

on Oct 30th, 2016, 5:22pm, Alincon wrote:
Did I miss previous discussions on this?

Apparently you did! It was included in the announcement of LBB v2.60 (June 2014) where it says 'You can assign to a sub-string, for example: MID$(test$,7,1) = "W"' and it's documented in the LBB Help File under Benefits... New Features where it says 'You can assign a new value to a sub-string, for example MID$(test$,7,1) = "W" or RIGHT$(hello$,6) = "world!"'.

Richard.