Re: [Phix Tutorial] Basic Sequence Actions
- Posted by petelomax Jan 27, 2019
- 1379 views
euphoric said...
_tom said...
To assign an atom to an empty gap is futile-- nothing happens.
Why? That seems arbitrary.
It is (at least) logically consistent:
string s = "abcde" s[2..4] = '3' -- s is "a333e" (3 elements replaced) s[2..3] = '2' -- s is "a223e" (2 elements replaced) s[2..2] = '1' -- s is "a123e" (1 element replaced) s[2..1] = '0' -- s is "a123e" (0 elements replaced)