Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!cs.dal.ca!dal1!limoges From: limoges@ac.dal.ca Newsgroups: comp.lang.pascal Subject: Can I declare an array using a var in the index? Keywords: array Message-ID: <1994@ac.dal.ca> Date: 21 Sep 90 19:08:01 GMT Lines: 8 Organisation: Dalhousie University, Halifax, Nova Scotia, Canada I want to write a program which generates 2D arrays of size n x n after n has been input from the keyboard by the user running the program. My debugger tells me I must use a constant in the range used for the index type. Is there a way to declare an array using the n variable? Or do I have to declare a huge array (what a waste of memory) and then do sub-range processing based on user input? BTW I'm using Sun Pascal. Thanks for any help, Bertrand Limoges