Re: adob.stream - altering a byte() result
"R.Wieser" <[email protected]> Tue, 3 Jun 2025 09:32:55 +0200
| Newsgroups | alt.comp.lang.vbscript,alt.windows7.general |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
JJ, > mid(), left(), right(), including their "b" and "w" versions, are > functions > which returns a string constant, Which, returning a "string" instead of a "byte()" I mean, is a problem when (trying to) manipulate a Byte() string. :-| > so they can't be used as the left-side in an assignment. No programming > language allows a constant to be used as the left-side in an assignment. True, you can't change a constant. Now all you need to do it to explain how/why something like (string,3,1) is a constant, and not just a reference to an element inside the provided string. Also, the question was about "altering*. The example trying to do an in-place change is just that, an example (of what I tried). I would not mind* to be shown a set of functions specially for byte() strings, so they can be manipulated just like a standard strings can be. * not mind /too much/ I mean. I still regard it rather daft that byte() strings can not be manipulated the same way standard strings can. But thats MS to you. By the way: QBASIC (provided with DOS 5.x) has no problem with using mid() as the left side of an assignment. IOW, be carefull with claims like "no programming language". > In VB/VBA/VBS, string value is not mutable like array contents. i.e. > changed in-place. It can only be changed in-place via lower level > means such as Windows API. :-) You might remember I'm a hobby programmer. After I ran into the above shennigans of VBScript not actually supporting a byte() string, that's what I've done - implementing reading and writing the individual bytes as the first step. My question was/is aimed to find out if I didn't overlook something VBScript already offered. I do not really want to duplicate whats already there. Regards, Rudy Wieser