[Gambas-user] Accessing characters of string as array

Jussi Lahtinen jussi.lahtinen at gmail.com
Mon Nov 18 04:19:59 CET 2019


Works here with development version.
What is your version?


Jussi

On Mon, Nov 18, 2019 at 4:29 AM T Lee Davidson <t.lee.davidson at gmail.com>
wrote:

> The documentation for Mid() [0] says:
> Using string like arrays (as known as "Boxed strings")
> SINCE 3.12
> You can get the contents of a string using the following array-like syntax:
>
>
> Result = String [ Start As Integer [ , Length As Integer ] ]
> --- end quote ---
>
> Nice. But the following causes the exception, "Not an object":
> Public Sub Main()
>
>    Dim s As String = "123456789"
>
>    Print s[3, 1]
>
> End
>
>
> Is this a bug, or am I misunderstanding the documentation?
>
>
> ___
> Lee
>
> [0] http://gambaswiki.org/wiki/lang/mid
>
> ----[ 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/20191118/89c06ef7/attachment.html>


More information about the User mailing list