Suggest adding -c switch to /bwrite, behaving the same way as with /bcopy, truncating the file to chop everything beyond the bytes being written to disk.

Without changing any other behaviors, several related description wordings in /help Binary files could also be made:

1. The -c switch in /bcopy has also worked for /bset since at least 6.35, so would be nice to have /bset -c documented in /help.

Code:
//bset &var 1 11 22 33 44 | bset -c &var 2 55 66 | echo -a $bvar(&var,1-)


2. Description for /bcopy includes:

Quote:
If you specify the -c switch, the first &binvar is chopped to length N + M.


This reads as if using -c while copying M=3 bytes from &from to position N=2 of &to results in length 2+3=5. It actually overwrites the 2nd through 4th bytes for a length of 4, meaning length for N=1+ is N+M-1. It also doesn't apply when using M = -1 or when M is a greater number than the remaining bytes beginning at the S'th position. The existing behavior is correct, perhaps a better wording would be something closer to:

Quote:
If you specify the -c switch, the destination &binvar is shortened to eliminate any bytes beyond those overwritten by the bcopy.


3. Would be nice if /help were updated to say that /bcopy allows N = -1 for appending to the destination string.

4. Usage of 'position' and 'byte description' could be re-worded to clarify that positions are 1-based when used within /bset, /bcopy, $bvar, and $bfind - with the first byte of the string at byte position N=1 and S=1. However positions are 0-based within /bread and /bwrite, with the first byte of the disk file at byte position S=0.

i.e. using N=1 in /bset and /bcopy writes to the 1st byte of a &binary variable, but using S=1 in /bread and /bwrite reads/writes the 2nd byte of the disk file.