Re: How to create a "Array of Bytes" in VBScript?
- From: "Richard Mueller [MVP]" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 23 May 2005 12:30:28 -0500
Arno Bosch wrote:
> I need to create an "array of bytes" in VBScript. If I try something like:
> ===
> dim Test5()
> for j=0 to 10
> redim preserve Test5(j)
> Test5(j) = CByte(j)
> next
> ===
> Result:
> Though: vartype(Test5(1)) = 17 = Byte
> there is: vartype(Test5) = 8204 = array of variant
>
> Has anybody an idea how to create the correct data type?
Hi,
As you've found, you can create an array of byte values, but the datatype
for the array is variant. You cannot create a variable of datatype Byte()
(byte array) in VBScript (although you can read a byte array). You can only
create or modify a byte array in VB, where you can Dim it as Byte().
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--
.
- Follow-Ups:
- Re: How to create a "Array of Bytes" in VBScript?
- From: Michael Harris \(MVP\)
- Re: How to create a "Array of Bytes" in VBScript?
- References:
- How to create a "Array of Bytes" in VBScript?
- From: Arno Bosch
- How to create a "Array of Bytes" in VBScript?
- Prev by Date: Re: How to dynamically populate a listbox in VBScript. using Client-Side html
- Next by Date: Re: Using a text file as database
- Previous by thread: How to create a "Array of Bytes" in VBScript?
- Next by thread: Re: How to create a "Array of Bytes" in VBScript?
- Index(es):
Relevant Pages
|