sam@utcsri.UUCP (08/25/87)
Can anyone out there tell me whether there is any form of dynamic arrays in Modula-2? Specifically, if it will only be known at run-time how large a certain array needs to be (it is given as user input, or something), can you do something like PROCEDURE p(N:CARDINAL); VAR x:ARRAY [0..N] OF ...blah... and simply pass the required size of x as the parameter to p? I can find nothing in Wirth or any other reference I can find saying that you cannot, and the syntax allows it. It seems like such a common situation that I cannot imagine that the language would prevent me from doing it, yet the compiler I have barfs when I try (admittedly it is an experimental compiler). So which is broken, the compiler or the language? Thanks in advance for your help. -- -Sam Weber UUCP: {ihnp4 utzoo decwrl uw-beaver}!utcsri!sam ARPA: sam@csri.toronto.edu CSNET: sam@toronto