| Title: | DEC Pascal Bug Reports | 
| Notice: | New kit announcement in TURRIS::Pascal conference | 
| Moderator: | TLE::GARRISON | 
| Created: | Wed Sep 09 1992 | 
| Last Modified: | Fri May 30 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 838 | 
| Total number of notes: | 3659 | 
The following program gets an internal error on VAX, and an
assertion with a GEM-based compiler.  If you use a VARYING
instead of a STRING, it works.  Also, on VAX, if you only have
1 parameter instead of 2, it works.  With a GEM-based compiler,
it gets an assertion even with 1 parameter.
				-John
program foo(output);
type
   rec_a = record
           s : string(16);
           end;
procedure test(p : rec_a := [otherwise zero];
               q : rec_a := [otherwise zero]);
  begin
  writeln(p.s,q.s);
  end;
begin
test;
end.
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 833.1 | TLE::REAGAN | All of this chaos makes perfect sense | Wed May 21 1997 15:25 | 14 | |
|     This is an invalid program.  We made the decision back when we
    added schema that we wouldn't handle default parameter values for
    run-time-sized types.  If you try something like
    
    p : rec_a := zero
    
    you already get an error message.  I've fixed the compiler to also
    give a message for [otherwise zero].
    
    Yes, in theory, we certainly could support these concepts, but not
    this close to the next release and not without some reasonable
    requests from customers.
    
    				-John
 | |||||