Maelstorm Posted March 21, 2005 Posted March 21, 2005 Consider the following code:const cMaxRecords = 32767 ' Maximum number of tag recordsdim FDI(cMaxRecords) ' Input file record databasedim FDO(cMaxRecords) ' Output file record databaseI keep getting a VBScript compilation error with this construct. Does VBScript support this?
Martin Zugec Posted March 21, 2005 Posted March 21, 2005 Dim? In vbscript you dont need to declare variables (not with Dim and not without settings Option Explicit)...
Maelstorm Posted March 21, 2005 Author Posted March 21, 2005 Well, because this program is kinda big, I have option explicit set to force variable declarations.
Martin Zugec Posted March 21, 2005 Posted March 21, 2005 AFAIK only use of Dim isDim Variable, you cant define variable type etc... Like in VB
Weazle Posted March 22, 2005 Posted March 22, 2005 Dim a(10) ' is valid.Dim a(x) ' is not valid.Dim a(1=2) ' is not valid.Info from this pageSo i guess that it's not valid :-sTry with the Redim - like mentionned on that page
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now