By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!disappeared.> I tried @LINES on a big (1MB) file containing no newlines. TCC
disappeared.
Not particularly surprising. Why would you do such a thing?
> I am of the opinion that an app should never crash as a result of
> what the user does (short of deliberate sabotage).
>---Quote---
>> I am of the opinion that an app should never crash as a result of
>> what the user does (short of deliberate sabotage).
>---End Quote---
>It's a nice theory. In the real world, the amount of error trapping the
>programmer can do is finite, while the number of bizarre things a user can
>do is infinite.
It's a nice theory. In the real world, the amount of error trapping the
programmer can do is finite, while the number of bizarre things a user can
do is infinite.
Cute quip.
The file contained 1,048,576 bytes (of text) and no newlines. Had that file contained 1,048,575 or 1,048,577 bytes, TCC would not have crashed and would have correctly returned 0.
That also goes for any file with no newlines whose size is exactly a power of two greater than 65536 ... crash ... one more or one fewer character ... no crash.
That certainly is peculiar.