[Gambas-user] Swap function for arrays

Gianluigi bagonergi at gmail.com
Wed Jun 6 18:04:10 CEST 2018


2018-06-06 17:55 GMT+02:00 Gianluigi <bagonergi at gmail.com>:

>
>
> 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
>
>
Sorry kyndle = nice, I'm competing with Piccoro ;-D


>
>> ----[ 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/6e2c7eb2/attachment-0001.html>


More information about the User mailing list