RE: [bascom] BASCOM51 V2.08 MID() bug
Hi John,
I will check it. When there is a prob. a fix will be in the next beta.
... after a day, I checked it and fixed it. When you need an urgent fix for
this prob, send an email to 8051@mcselec.com otherwise it will be in the
next beta.
Best regards,
Mark
> -----Original Message-----
> From: owner-bascom@grote.net [mailto:owner-bascom@grote.net]On Behalf Of
> JOHN TIMMINS
> Sent: zaterdag 16 juni 2001 8:04
> To: 'bascom@grote.net'
> Subject: [bascom] BASCOM51 V2.08 MID() bug
>
>
>
> Hi Mark...
>
> I cannot get the MID() function to work correctly, the sample file
> STRINGS.BAS works OK so long as you DIM the variables in XRAM.
> Internal RAM
> causes a failure of the function where the variable S in my
> example below is
> chopped off to a LEN() of 2. The simulator shows the problem when watching
> the S and Z variables.
>
> This poses a bit of a problem when using the AT89C4051 with no possibility
> of using XRAM.
>
>
> Dim S As String * 50 'dimension string
> Dim Z As String * 20 'note that the length
> must be specified
>
> S = "This is a test"
>
> Z = "12345"
> Mid(s , 1 , 2) = Z 'change part of string
> Print S
>
>
>
> '12'
> is printed instead of the correct value of
> '12is a test'
>
>
> Cheers,
> JT.
>
>