PDA

View Full Version : Creating Multi-dimensional Arrays


Jason_Beaudoin
06-09-2003, 06:10 PM
I'm trying to create a multi-dimensional array, but I'm getting a "type-mismatch" error.

This is my code:

Dim Main_Vars(6, 6)
Main_Vars(0, 0) = "My string"
Response.Write(Main_Vars(0, 0)) 'This is the line where I get the error.

Any ideas?

Thanks in advance! :thumbsup:

ScottInTexas
06-09-2003, 08:08 PM
Jason,

I am doing the same thing (except I have variables loading the array). I copied and pasted your code into a blank page (below) and ran it on my localhost. No problem!

It looked right when I read your post.
Here's the page

<% @LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<% Dim Main_Vars(6, 6)
Main_Vars(0, 0) = "My string"
Response.Write(Main_Vars(0, 0))
%>
<body>
There is nothing here.
</body>
</html>


Good luck!