Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!think!mintaka!bloom-beacon!eru!luth!sunic!dkuug!freja!rimfaxe!dat0 From: dat0@rimfaxe.diku.dk (Dat-0 undervisningsassistent) Newsgroups: comp.lang.pascal Subject: Re: TP bug??? Message-ID: <5038@freja.diku.dk> Date: 14 Dec 89 09:11:27 GMT References: Sender: news@freja.diku.dk Distribution: comp Lines: 41 ron@clarity.Princeton.EDU (Ronald Beekelaar) writes: >I was trying to compile the following TP code, but everytime the compiler hang >and even ctrl-break didn't work anymore. I had to reboot the computer. >Unit mycolor; >Interface >Function color(fore, back: byte): byte; >Implementation >Const stringcolor: byte = color(blue, red); ^^^^^^^^^^^^^^^^ This is clearly a syntax-error. According to the reference guide (v.5.5), this has to be a typed constant, which on the other hand could be a constant, an array constant, a record constant, a set constant or nil, but *not* a function call. Why it makes your compiler hang I do not know, but it shouldn't work anyway. >Function color(fore, back: byte): byte; > begin > color:= (fore and $8F) + (back and $70) > end; ------------------------------------------------------------------------- Kristian Damm Jensen (damm@rimfaxe.diku.dk) "Sex is more fun than logic. One cannot prove this, but it is, in the same way that Mount Everest is and Alma Cogan isn't." (Monty Python: 'The tape of the soundtrack of the film of the trailer of Monty Python and the Holy Grail') Kristian Damm Jensen (dat0@diku.dk) Institute of datalogi, University of Copenhagen (DIKU) Universitetsparken 1, DK-2100 Copenhagen \, Denmark