I'd like to use a constant record as a default parameter. Is there some way to do this? Here's my use case:
type lt_ints = record left, top : longint; end; const lt_zero : lt_ints = (left:0; top:0); procedure do_something (const offset_lt : lt_ints = lt_zero); The procedure declaration gives an error ("illegal expression"). I assume the trouble is that lt_zero cannot be used as a default parameter value, because it is not truly a constant: it is an initialized variable. Perhaps my real question is: how do I make a constant record which is truly constant, rather than an initialized variable? Thoughts? Thanks :-) ~David. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal