I call a function to process and modify an array. But the array does not change at all. Looks like a Swift major bug ???
var Draw_S = [String]();
var Draw_E =
You have misunderstood how arrays work in Swift. They are value types, which is unlike Objective-C where they are reference types.
What this means is that the function alter_them
gets a copy of the arrays and you are actually modifying the copy.
You will need to return the modified versions from the alter_them
function and re-assign Draw_S
and Draw_E
.
FWIW instance variables usually start with a lowercase character i.e. draw_S