[Gambas-user] Swap function for arrays
Gianluigi
bagonergi at gmail.com
Wed Jun 6 17:55:41 CEST 2018
2018-06-06 16:29 GMT+02:00 Charlie Ogier <charlie at cogier.com>:
> Try this. It will correct the "8" & "7" in one line: -
>
> *Public Sub Form_Open()*
> *Dim sArray As String[] = ["0", "1", "2", "3", "4", "5", "6", "8", "7",
> "9"] *
>
> *sArray.add(sArray.Extract(7)[0], 8)*
>
> *Print sArray.Join(" ")*
>
> *End*
>
> Charlie
>
>
Hi Charlie,
kyndle :-) or if you want replace the number:
Print Replace(sArray.Join(" "), sArray[3], "33")
Regards
Gianluigi
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180606/e81ac752/attachment.html>
More information about the User
mailing list