Path: utzoo!attcan!lsuc!ecicrl!clewis From: clewis@ecicrl.UUCP (Chris Lewis) Newsgroups: comp.lang.perl Subject: Math error in Perl PL41 Message-ID: <978@ecicrl.UUCP> Date: 3 Dec 90 04:33:06 GMT Reply-To: clewis@ecicrl.UUCP (Chris Lewis) Organization: Elegant Communications Inc., Ottawa, Canada Lines: 20 Complement of 0 doesn't work as expected (Perl 3, PL41, AT&T 3b1, 3.5.1.4). The following perl program: $foo = 0; printf "%o, %x, %o\n", 0666, ~$foo, 0666 & ~$foo; prints: 666, 80000000, 0 Complement of 0 should be 0xFFFFFFFF (-1) not 0x80000000. This is newish behaviour - worked fine at PL 27. My umask emulator now makes all the files mode 000. Yuck. -- Chris Lewis, Phone: (613) 832-0541 UUCP: uunet!utai!lsuc!ecicrl!clewis Moderator of the Ferret Mailing List (ferret-request@eci386) Psroff mailing list (psroff-request@eci386) Brought to you by Super Global Mega Corp .com