Talk:Parse an IP Address: Difference between revisions

m
Line 31:
::: How would you represent the required results in C, for example? --[[User:Rdm|Rdm]] 15:49, 28 September 2011 (UTC)
:::: How would it be any different from a console-output-capable language that wasn't C? --[[User:Short Circuit|Michael Mol]] 15:50, 28 September 2011 (UTC)
::::: In languages which have variable length tuples as a native time type(like Pico Lisp) returning a port number or omitting a port number is trivial. You can either return (addr-family ip-address port) or (addr-family ip-address). In a language like C, it's much more natural to use something like a struct with a fixed memory layout. Of course, whether this issue propagates to a textual representation of the result is a different issue... But currently the task is asking for a result and a textual representation of that result would be for illustrative purposes. --[[User:Rdm|Rdm]] 16:21, 28 September 2011 (UTC)
6,951

edits