Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!milne@ICS.UCI.EDU From: milne@ICS.UCI.EDU (Alastair Milne) Newsgroups: comp.lang.pascal Subject: Re: valid construction? Message-ID: <12550@brl-adm.ARPA> Date: 21 Mar 88 20:01:02 GMT Sender: news@brl-adm.ARPA Lines: 33 >Of course this is a compiler error, rendering response 1 superfluous. >As to the comments about 'maxelts': is this what the compiler refers [to] >in its quite vague message "Invalid Type"? I don't see how you can conclude so strongly. It's perfectly reasonable for a compiler to refuse to create an object, or the type for an object, bigger than it can allocate. If MaxElts was declared too big, the array depending on it could very easily go beyond data segment capacity -- and this needn't even presume an 8088/6 machine. Also, if MaxElts wasn't declared before that use, the compiler would have no way of knowing how big an array to allocate. Of course, the message in that case should have been 'undeclared identifier', and if this is so, the compiler could be taken to task. However, although one could ask for a more precise diagnostic, a type which can't even create an allocatable object could certainly be considered invalid. >If not -- and admittedly, nothing else seems >awry -- it would appear the compiler had not processed the definition of >type 'record1' first, which specifies the compiler error: failing to process >definitions in order. Until it is determined that there is nothing wrong with MaxElts, whose declaration was not in the circulated code fragment, I think this is a stab in the dark. Too great a value for MaxElts is far more likely. Alastair Milne