Package: gpc-4.1 Hi,
I've been hit with what I believe is a miss compilation. Attached code is enough to reproduce the error. Input given to the program: 5000 Expected output: a must be gt 0 and lt 4000! Actual output: good By replacing > t := 'a must be gt 0 and lt 4000!'; with > return 'a must be gt 0 and lt 4000!'; the actual output becomes the expected output. I would like to apologise in advance in case this is not a bug, but my missunderstanding of the language. Cheers, -- Raphael Geissert - Debian Maintainer www.debian.org - get.debian.net
program test; var n: integer; function t(a: integer): string; begin if (a < 1) or (a > 3999) then t := 'a must be gt 0 and lt 4000!'; t := 'good'; end; begin readln(n); writeln(t(n)); end.
signature.asc
Description: This is a digitally signed message part.