71b creating strings with binary data
|
12-20-2022, 04:14 AM
(This post was last modified: 12-20-2022 04:41 AM by dmh.)
Post: #1
|
|||
|
|||
71b creating strings with binary data
Hi, I'm trying to build binary data in a string for transmission via IL and the strings will contain unprintable characters including 0 (ie 0x00).
The problem I am having is that whenever I use CHR$() to place a value in a specific position in the string all preceding bytes with 0x00 in them are replaced with the space character. Is there a way around this or a better way to do it? Resetting the spaces to 0x00 after CHR$() would be time consuming and error prone and I wanted the default to be 0x00 unless I assign a value. I thought strings would be the best way to build such data and then output it all to IL using the string at once. In the following example the string initially contains 0x00 but once CHR$() is used to place a value in character 5 the preceding characters are changed to space (even if I zero the preceding characters first after DIM). Code: DIM P1$[10] Any advise appreciated. Edit: it doesn't matter if you use CHR$() or a character directly (eg "*") as the same issue occurs but as much of the data will be binary I will typically be using CHR$() Calculator Clique on YouTube |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
71b creating strings with binary data - dmh - 12-20-2022 04:14 AM
RE: 71b creating strings with binary data - J-F Garnier - 12-20-2022, 09:50 AM
RE: 71b creating strings with binary data - dmh - 12-20-2022, 10:07 AM
RE: 71b creating strings with binary data - J-F Garnier - 12-20-2022, 10:57 AM
RE: 71b creating strings with binary data - Garth Wilson - 12-20-2022, 08:22 PM
RE: 71b creating strings with binary data - dmh - 12-21-2022, 12:21 AM
RE: 71b creating strings with binary data - KeithB - 12-21-2022, 04:28 PM
|
User(s) browsing this thread: 5 Guest(s)