|
-
Aug 21st, 2000, 10:56 AM
#1
Thread Starter
New Member
How do I create an array of constants? I'm converting a C program to VB that has a 256 byte array defined as
unsigned intCRCArray[256] = {27,123, ... 40 }
In VB, I could individually assign each array element such as:
Dim CRCTable(256) As integer
CRCTable(0) = 27
CRCTable(1) = 123
...
CRCTable(255) = 40
but this is tedious to type in. I want to do something like:
const CRCTable(256) as integer = 27, 123, ..., 40
so that I can simply copy-paste the array from my C program, but this generates an error. Is there a way to do this?
Thanks,
Randy
-
Aug 21st, 2000, 11:01 AM
#2
Addicted Member
Hi,
try:
Code:
dim CRCTable
CRCTable = Array(27,123,.......40)
Hope this helps
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Aug 21st, 2000, 11:38 AM
#3
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|