Page 1 of 1

A problem with XDATA variable ...

Posted: 08 Dec 2016 10:15
by Waldo
Hello community, I have a problem with XDATA variable ...
I hope you can help me.
An example:

Test;

Var s1: string [5]; Xdata;
S2: string [5];
L1, l2: word;

Begin
S1: = '1234';
S2: = 1234 ';
L1: = strlen (s1); // res = 0
L2: = strlen (s2); // res = 4
end.

// 8951mlk File:
<XDATA> Min 0x0000, Max 0x3fff

Why are the results not the same?

Re: A problem with XDATA variable ...

Posted: 09 Dec 2016 14:33
by lana.arsic
Hi,

I have answered you here:

http://forum.mikroe.com/viewtopic.php?f ... 11#p277630

Best regards,
Lana

Re: A problem with XDATA variable ...

Posted: 15 Dec 2016 18:25
by Waldo
First of all thank you for the reply.
Now I no longer wonder why the strangest effect have occurred.
This means I have to write my own routines with each access to xdata variable, and can not access the implemented routines in the program.
This is also quite confusing and complicated when I have to work with xdata variable always with pointern, because I have a lot of variables in the xdata.
Too bad that does not work ...
I'll probably need to continue using turbo51....