Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
I really hate the way comparison operators in different languages can make life hard.
The other day in perl a colleague introduced a bug. We store file sizes in sybase as an int(2 GB). It was defined about 20 years ago. One file we are sent contains full history rather than changes. On Wednesday it went over 2GB. BANG!
So a colleague said: -
if $filesize gt 2147483647
{
$filesize = 2147483647
}
Then call sp.
Suddenly ALL file sizes are 2147483647
For strings "gt" works. For int you have to use ">" !!!!!!
How f**king stupid is that? What m0r0n designs things that way?
I suppose if it was easy everyone would be doing it......
Comment