New function parse_value() for parsing a value of specified width.