Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!decwrl!shelby!portia!dhinds From: dhinds@portia.Stanford.EDU (David Hinds) Newsgroups: comp.lang.pascal Subject: Re: TP bug??? Summary: The function call is definitely illegal Message-ID: <7708@portia.Stanford.EDU> Date: 15 Dec 89 21:09:29 GMT References: <2588590B.19990@paris.ics.uci.edu> Sender: David Hinds Distribution: comp Organization: Stanford University Lines: 12 In article <2588590B.19990@paris.ics.uci.edu>, milne@ics.uci.edu (Alastair Milne) writes: > ron@clarity.Princeton.EDU (Ronald Beekelaar) writes: > >Const stringcolor: byte = color(blue, red); > ^^^^^ I believe this function call is illegal. The call is certainly illegal. I think only simple expressions can be evaluated in constant definitions, typed or otherwise. I think they can include compile-time internal functions (like sizeof, ord, hi, lo, ofs, seg), but nothing else, so probably not even trig functions. Since the value has to be calculated at compile-time, it would be very tricky for the compiler to use part of the program-being-compiled to evaluate it. It isn't handling the problem with much grace, though.