{"comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/0c0ce58d6674b999c74e2d422fbc714c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"0c0ce58d6674b999c74e2d422fbc714c","url":"https://api.github.com/users/tybor","login":"tybor","id":97251},"position":42,"updated_at":"2011-11-17T01:06:35Z","commit_id":"c0a93941f7759a7efa6415a8877b173818729ef7","url":"https://api.github.com/repos/tybor/Liberty/comments/726378","line":132,"body":"I wish we can write something like:\ninspect a_value\n...\nwhen 4...7 then Result := 7\nwhen 8...11 then Result := 11\nand so on....\nBut we would need changes in the compiler to allow inspect on any COMPARABLE and on ranges.... I would rather turn it into something like:\n\nfor (i=0; i<primes_table_size && primes[i]<n; ++i) result=primes[i];\n\nAs you may read in https://github.com/tybor/Liberty/commit/6441ad1125fc271937f00ff77c037897c057e35c","html_url":"https://github.com/tybor/Liberty/commit/c0a93941f7#commitcomment-726378","id":726378,"path":"sys/runtime/c/deep_twin.c","created_at":"2011-11-17T01:06:35Z"}}