Path: news.daimi.aau.dk!jlk From: jlk@daimi.aau.dk (J|rgen Lindskov Knudsen) Newsgroups: comp.lang.beta Subject: Re: boolean checking Date: 26 Oct 1995 22:24:00 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 42 Message-ID: <46p1q0$681@krone.daimi.aau.dk> References: <46nn7l$dvb@nic.zcu.cz> Reply-To: jlknudsen@daimi.aau.dk (Jorgen Lindskov Knudsen) NNTP-Posting-Host: fraxinus.daimi.aau.dk In <46nn7l$dvb@nic.zcu.cz> Thus spake Marek Novy : >I had to be absent minded writing i:@boolean instead of i:@integer in my >program and it caused very strange behaviour. Because the i variable has been >used very frequently in the program. >I'm suprised this error hasn't been checked by the type system. >For instance: > -1->i; > i->putint; >prints 255 etc. >I understand the booleans are implemented as integers. But it cant't influence >semantics. You are right. version 5.0 (and previous versions as well) had no type checking on assignments between e.g. integers and booleans. Version 5.1 of the compiler includes type checking of such assignments. However, version 5.1 only gives warnings in such assignments to allow people time to remove these erroneous assignments gradually from their programs. Future versions of the compiler will mark there assignments as errors. Regards, Jorgen Lindskov Knudsen, Computer Science Department, Aarhus University Ny Munkegade 116, DK-8000 Aarhus C, DENMARK E-mail: jlknudsen@daimi.aau.dk, Phone: +45 89 42 32 33, Fax: +45 89 42 32 55 ************ BETA information Sources ************************ * WWW: http://www.mjolner.dk * * http://www.daimi.aau.dk/~beta/info * * News: comp.lang.beta * * FAQ: http://www.daimi.aau.dk/~beta/FAQ * * E-mail: info@mjolner.dk * * Address: Mjolner Informatics, Science Park Aarhus, * * Gustav Wieds Vej 10, DK-8000, Aarhus C, DENMARK * * Tel.: +45 86 20 20 00 * * Fax.: +45 86 20 12 22 * **************************************************************