Hi,
What is the good method to handle a array of bytes (and NULL inside) ?
Than you
Yannick
Array of bytes
Moderator: Benj
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: Array of bytes
Hi Yannick,
Can you give us a little bit more information on what advice you would like?
Do you want to iterate through each element in an array via a function or just want to know how to create an array within Flowcode?
Can you give us a little bit more information on what advice you would like?
Do you want to iterate through each element in an array via a function or just want to know how to create an array within Flowcode?
Re: Array of bytes
Hi,
I have two things to do :
1 - Read few bytes in a memory, and return them into an array. If the memory does not contains 0x00, it works. I want to do a function who read N bytes at one address and return these bytes in an array.
2 - I also need to send commands on bus, and the command can contains 0x00...
Thank you
I have two things to do :
1 - Read few bytes in a memory, and return them into an array. If the memory does not contains 0x00, it works. I want to do a function who read N bytes at one address and return these bytes in an array.
2 - I also need to send commands on bus, and the command can contains 0x00...
Thank you
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Array of bytes
Hello,
Please can you post what you have so far and we will see if we can suggest ways to work around the problem for you.
Strings cannot have nulls as they have a special meaning but byte arrays should be ok.
Please can you post what you have so far and we will see if we can suggest ways to work around the problem for you.
Strings cannot have nulls as they have a special meaning but byte arrays should be ok.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Array of bytes
Hello Yannick,
Under the edit post section is a upload attachment tab, this can be used to upload files.(how to post a file here ?)
I think this was added for Flowcode 6 so you cannot do it using Flowcode 5 so we will need to find you a different workaround probably using strings but not the string functions such as length.How to pass or get an array to a function ?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Array of bytes
Thank you Benj.
So with fc5, i must use a global array i think.
I declare a STRING var "mystring[10]" and i use "mystring[0 to 9]".
I have not fc6 at work, we will wait for fc7, do you have a date for it ?
Now i know how to post files... i was looking at top ...
Best regards
Yannick
So with fc5, i must use a global array i think.
I declare a STRING var "mystring[10]" and i use "mystring[0 to 9]".
I have not fc6 at work, we will wait for fc7, do you have a date for it ?
Now i know how to post files... i was looking at top ...
Best regards
Yannick
- Dan81
- Valued Contributor
- Posts: 268
- Joined: Sun Jan 15, 2006 4:07 pm
- Location: Albi France
- Been thanked: 60 times
- Contact:
Re: Array of bytes
Bonjour Yannick
Ne déclare pas ta variable comme une chaine ("String") mais comme un octet (Byte) avec comme nom : myARRAY[10] par exemple.
Daniel
Ne déclare pas ta variable comme une chaine ("String") mais comme un octet (Byte) avec comme nom : myARRAY[10] par exemple.
Daniel