<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading and writing issues of Multi-dimentional array -FreeMASTER Lite in FreeMASTER</title>
    <link>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110853#M2025</link>
    <description>&lt;P&gt;Now, I calculate the actual address I need by reading the &lt;STRONG&gt;base addr&lt;/STRONG&gt; and the &lt;STRONG&gt;offset addr&lt;/STRONG&gt;, and calculate the address for each &lt;STRONG&gt;Symbol.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In this way, I can freely access each &lt;STRONG&gt;Symbol&lt;/STRONG&gt;. This is a feasible solution, but I'm not sure if it is the best practice?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to R/W&amp;nbsp;&lt;STRONG&gt;SysMatrixRun.pp_R[1][1][1]&lt;/STRONG&gt;&amp;nbsp; as in the MCU.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;data = await self._send_request('ReadTSA')

data_base = await self._send_request('GetSymbolInfo', "SysMatrixRun.pp_R[0][0][0]")
data = await self._send_request('GetSymbolInfo', "SysMatrixRun.pp_R[0][1][0]")
self.pp_R_base = data_base['addr']
self.MATRIX_MAX_SIZE = int((data['addr'] - data_base['addr']) / 4)

data_base = await self._send_request('GetSymbolInfo', "SysMatrixRun.pp_LC[0][0]")
self.pp_LC_base = data_base['addr']

self.COMB_MAX_NUM = int((self.pp_LC_base - self.pp_R_base)/(self.MATRIX_MAX_SIZE*self.MATRIX_MAX_SIZE*4))

# 注册pp_R
for i in range(self.COMB_MAX_NUM):
    for j in range(self.MATRIX_MAX_SIZE):
        for k in range(self.MATRIX_MAX_SIZE):
            addr = self.pp_R_base + ((i * self.MATRIX_MAX_SIZE * self.MATRIX_MAX_SIZE + j * self.MATRIX_MAX_SIZE + k) * 4)
            variable = {
                'name': f"SysMatrixRun.pp_R[{i}][{j}][{k}]",
                'addr': addr,
                'type': 'float',
                'size': 4
            }
            try:
                await self._send_request('DefineVariable', variable)
            except Exception as e:
                logging.warning(f"DefineVariable failed: {variable['name']} - {e}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 03:15:10 GMT</pubDate>
    <dc:creator>yono233</dc:creator>
    <dc:date>2025-06-05T03:15:10Z</dc:date>
    <item>
      <title>Reading and writing issues of Multi-dimentional array -FreeMASTER Lite</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110222#M2022</link>
      <description>&lt;P&gt;I attempted to read and write a &lt;STRONG&gt;multi-dimensional array&lt;/STRONG&gt; using FreeMASTER Lite.&lt;/P&gt;&lt;P&gt;For example, in the following structure, the "&lt;STRONG&gt;pp_R&lt;/STRONG&gt;" part.&lt;/P&gt;&lt;P&gt;```c&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;typedef&lt;/SPAN&gt; &lt;SPAN&gt;struct&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;float&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;pp_R&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;COMB_MAX_NUM&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;&lt;SPAN&gt;MATRIX_MAX_SIZE&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;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FreeMASTER, R&amp;amp;W operations can be performed normally, but in &lt;STRONG&gt;Lite&lt;/STRONG&gt;, they cannot.&lt;/P&gt;&lt;P&gt;After testing, it seems that Lite only supports one-dimensional arrays. Is that true?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 08:26:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110222#M2022</guid>
      <dc:creator>yono233</dc:creator>
      <dc:date>2025-06-04T08:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and writing issues of Multi-dimentional array -FreeMASTER Lite</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110481#M2023</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251045"&gt;@yono233&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you please elaborate on your tests ? What API calls did you use and which ones passed on FreeMASTER and failed on Lite ?&lt;/P&gt;
&lt;P&gt;FreeMASTER Lite handles all symbols as continuous memory regions.&amp;nbsp; Let's assume that:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#define COMB_MAX_NUM 2
#define MATRIX_MAX_SIZE 4
_SYSTEM_MATRIX matrix = {};&lt;/LI-CODE&gt;
&lt;P&gt;After reading the TSA FreeMASTER Lite will create the following symbols:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=&amp;gt; pcm.GetSymbolInfo('matrix').then(console.log).catch(console.error)
&amp;lt;= {success: true, data: {addr: 536877192, size: 276, type: '_SYSTEM_MATRIX'}}
=&amp;gt; pcm.GetSymbolInfo('matrix.pp_R').then(console.log).catch(console.error)
&amp;lt;= {success: true, data: {addr: 536877192, size: 128, type: 'float'}}
=&amp;gt; pcm.GetSymbolInfo('matrix.pp_R[0]').then(console.log).catch(console.error)
&amp;lt;= {success: true, data: {addr: 536877192, size: 4, type: 'float'}}
&lt;/LI-CODE&gt;
&lt;P&gt;To manipulate the &lt;EM&gt;pp_R&amp;nbsp;&lt;/EM&gt;array you would use &lt;EM&gt;matrix.pp_R &lt;/EM&gt;symbol either via&amp;nbsp;&lt;EM&gt;ReadFloatVariable,&lt;/EM&gt;&amp;nbsp;&lt;EM&gt;ReadFloatArray &lt;/EM&gt;or&lt;EM&gt; WriteFloatVariable, WriteFloatArray&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;If symbol name is used with a index:&amp;nbsp;&lt;EM&gt;matrix.pp_R&lt;STRONG&gt;[i] &lt;/STRONG&gt;&lt;/EM&gt;the address to the memory area will be computed as &lt;EM&gt;&lt;STRONG&gt;i&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;* 4 (float size) offset with respect to&amp;nbsp;&lt;EM&gt;matrix.pp_R&lt;/EM&gt; address&lt;EM&gt;.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:37:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110481#M2023</guid>
      <dc:creator>iulian_stan</dc:creator>
      <dc:date>2025-06-04T13:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and writing issues of Multi-dimentional array -FreeMASTER Lite</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110760#M2024</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;I will provide detailed tests.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define COMB_MAX_NUM 260
#define MATRIX_MAX_SIZE 10

_SYSTEM_MATRIX SysMatrixRun= {};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's understand the two symbols: &lt;STRONG&gt;SysMatrixRun.vhs[5]&lt;/STRONG&gt; and &lt;STRONG&gt;SysMatrixRun.pp_R[0][1][1]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;The first&lt;/H2&gt;&lt;P&gt;I use this method TSA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;FMSTR_TSA_TABLE_BEGIN(first_table)
FMSTR_TSA_RW_VAR(SysMatrixRun, FMSTR_TSA_USERTYPE(_SYSTEM_MATRIX))
FMSTR_TSA_STRUCT(_SYSTEM_MATRIX)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YL, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YC, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YR, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, attr, FMSTR_TSA_UINT8)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, vhs, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, J, FMSTR_TSA_FLOAT)
FMSTR_TSA_TABLE_END( )

FMSTR_TSA_TABLE_LIST_BEGIN( )
FMSTR_TSA_TABLE(first_table)
FMSTR_TSA_TABLE_LIST_END( )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I can load TSA in &lt;STRONG&gt;MASTER&lt;/STRONG&gt; or &lt;STRONG&gt;lite.&amp;nbsp;&lt;/STRONG&gt;Then I conducted a test using Python.&lt;/P&gt;&lt;P&gt;This will obtain TSA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    data = await SendRequest(ws, 'ReadTSA')
    global count
    count = int(data['count'])
    print('Parsed TSA contained %d symbols.' % count)

    global variable
    for i in range(count):
        data = await SendRequest(ws, 'EnumSymbols', i)
        print(data)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, this will &lt;STRONG&gt;successfully&lt;/STRONG&gt; read the actual value.. For example, &amp;gt;&amp;gt; 41.23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    variable = {
        'name': 'SysMatrixRun.vhs[5]',
        'addr': 'SysMatrixRun.vhs[5]',
        'type': 'float',
        'size': 4
    }
    await SendRequest(ws, 'DefineVariable', variable)
    data = await SendRequest(ws, 'ReadVariable', variable['name'])
    print(data)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then,this will &lt;STRONG&gt;unsuccessfully &lt;/STRONG&gt;read the actual value. Error message is roughly "&lt;STRONG&gt;Symbol not exist&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    variable = {
        'name': "SysMatrixRun.pp_R[0][1][1]",
        'addr': "SysMatrixRun.pp_R[0][1][1]",
        'type': 'float',
        'size': 4
    }
    await SendRequest(ws, 'DefineVariable', variable)
    data = await SendRequest(ws, 'ReadVariable', variable['name'])
    print(data)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, even when using TSA, the variable "&lt;STRONG&gt;SysMatrixRun.pp_R[0][1][1]&lt;/STRONG&gt;" cannot be read in the &lt;STRONG&gt;MASTER&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But after I changed to use this TSA, I was able to read "&lt;STRONG&gt;SysMatrixRun.pp_R[0][1][1]&lt;/STRONG&gt;" in the &lt;STRONG&gt;MASTER&lt;/STRONG&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FMSTR_TSA_STRUCT(_SYSTEM_MATRIX)

FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][0], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][1], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][2], FMSTR_TSA_FLOAT)
...
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[59][7], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[59][8], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[59][9], FMSTR_TSA_FLOAT)

FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[0], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[1], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[2], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[3], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[4], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[5], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[6], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[7], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[8], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[9], FMSTR_TSA_FLOAT)

FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YL, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YC, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YR, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, attr, FMSTR_TSA_UINT8)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, vhs, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, J, FMSTR_TSA_FLOAT)
FMSTR_TSA_TABLE_END( )

FMSTR_TSA_TABLE_LIST_BEGIN( )
FMSTR_TSA_TABLE(first_table)
FMSTR_TSA_TABLE_LIST_END( )&lt;/LI-CODE&gt;&lt;P&gt;I wonder if it's because the "&lt;STRONG&gt;lite&lt;/STRONG&gt;" version is unable to interpret the writing style of multi-dimensional arrays like "[][]"?&lt;/P&gt;&lt;P&gt;If you need more test information, I will provide "the second"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 01:22:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110760#M2024</guid>
      <dc:creator>yono233</dc:creator>
      <dc:date>2025-06-05T01:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and writing issues of Multi-dimentional array -FreeMASTER Lite</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110853#M2025</link>
      <description>&lt;P&gt;Now, I calculate the actual address I need by reading the &lt;STRONG&gt;base addr&lt;/STRONG&gt; and the &lt;STRONG&gt;offset addr&lt;/STRONG&gt;, and calculate the address for each &lt;STRONG&gt;Symbol.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In this way, I can freely access each &lt;STRONG&gt;Symbol&lt;/STRONG&gt;. This is a feasible solution, but I'm not sure if it is the best practice?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to R/W&amp;nbsp;&lt;STRONG&gt;SysMatrixRun.pp_R[1][1][1]&lt;/STRONG&gt;&amp;nbsp; as in the MCU.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;data = await self._send_request('ReadTSA')

data_base = await self._send_request('GetSymbolInfo', "SysMatrixRun.pp_R[0][0][0]")
data = await self._send_request('GetSymbolInfo', "SysMatrixRun.pp_R[0][1][0]")
self.pp_R_base = data_base['addr']
self.MATRIX_MAX_SIZE = int((data['addr'] - data_base['addr']) / 4)

data_base = await self._send_request('GetSymbolInfo', "SysMatrixRun.pp_LC[0][0]")
self.pp_LC_base = data_base['addr']

self.COMB_MAX_NUM = int((self.pp_LC_base - self.pp_R_base)/(self.MATRIX_MAX_SIZE*self.MATRIX_MAX_SIZE*4))

# 注册pp_R
for i in range(self.COMB_MAX_NUM):
    for j in range(self.MATRIX_MAX_SIZE):
        for k in range(self.MATRIX_MAX_SIZE):
            addr = self.pp_R_base + ((i * self.MATRIX_MAX_SIZE * self.MATRIX_MAX_SIZE + j * self.MATRIX_MAX_SIZE + k) * 4)
            variable = {
                'name': f"SysMatrixRun.pp_R[{i}][{j}][{k}]",
                'addr': addr,
                'type': 'float',
                'size': 4
            }
            try:
                await self._send_request('DefineVariable', variable)
            except Exception as e:
                logging.warning(f"DefineVariable failed: {variable['name']} - {e}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 03:15:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2110853#M2025</guid>
      <dc:creator>yono233</dc:creator>
      <dc:date>2025-06-05T03:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and writing issues of Multi-dimentional array -FreeMASTER Lite</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2111273#M2026</link>
      <description>&lt;P&gt;Thank you for details. I confirmed the issue on FreeMASTER Lite side - there is bug in expression evaluation (when it tries to convert the symbol to an address). It will be addressed it in the next release.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to be clear - FreeMASTER nor FreeMASTER Lite cannot resolve multi dimensional arrays. That is why you could not use multiple indexes in the &lt;STRONG&gt;First&lt;/STRONG&gt; scenario.&lt;/P&gt;
&lt;P&gt;When you defined additional TSA Members such as:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][0], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][1], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][2], FMSTR_TSA_FLOAT)&lt;/LI-CODE&gt;
&lt;P&gt;each one is treated as separate symbol (not an actional multidimensional array). And FreeMASTER resolves&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;SysMatrixRun.pp_R[0][1][k]&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;address as &lt;EM&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;STRONG&gt;ysMatrixRun.pp_R[0][1&lt;/STRONG&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/EM&gt;(symbol base address) + &lt;EM&gt;&lt;STRONG&gt;k&lt;/STRONG&gt;&lt;/EM&gt;(offset).&lt;/P&gt;
&lt;P&gt;Usually, I would define variables using the first approach you described and compute the offset from&amp;nbsp;matrix symbol:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;addr: SysMatrixRun.pp_R[i][j][k] → SysMatrixRun.pp_R[i * d2 * d3 + j * d3 + k]&lt;/LI-CODE&gt;
&lt;P&gt;where &lt;EM&gt;&lt;STRONG&gt;d2&lt;/STRONG&gt;&lt;/EM&gt;, &lt;EM&gt;&lt;STRONG&gt;d3&lt;/STRONG&gt;&lt;/EM&gt; are matrix dimension and can be computed either based on symbol size or using helper variables. The reason is that in order to emulate the access using independent indexes requires definitions of additional symbols (down to one dimensional arrays) which creates additional overhead if matrix dimensions change.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 10:59:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Reading-and-writing-issues-of-Multi-dimentional-array-FreeMASTER/m-p/2111273#M2026</guid>
      <dc:creator>iulian_stan</dc:creator>
      <dc:date>2025-06-05T10:59:28Z</dc:date>
    </item>
  </channel>
</rss>

