71b creating strings with binary data
|
12-20-2022, 10:57 AM
Post: #4
|
|||
|
|||
RE: 71b creating strings with binary data
(12-20-2022 10:07 AM)dmh Wrote: I actually did exactly that but didn't show it in the example above. I dimensioned the string, looped and set every character to 0x00 and then set a character in the middle of the string and all the preceding characters get set to space. I can't reproduce it. >DIM A$[10] >FOR I=1 TO 10 @ A$[I,I]=CHR$(0) @ NEXT I >LEN(A$) 10 >NUM(A$[2]) 0 >A$[5,5]="A" >NUM(A$[2]) 0 (12-20-2022 10:07 AM)dmh Wrote: How did you do it? I usually do it in this way: I append all the bytes successively, in order, so the length is automatically managed. DIM A$[N] A$="" FOR I=1 TO N A$=A$&CHR$(x) ! append any byte including null NEXT I J-F |
|||
« 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: 6 Guest(s)