Memory layout of a data structure: Difference between revisions
Memory layout of a data structure (view source)
Revision as of 04:58, 14 November 2009
, 14 years ago→{{header|J}}
m (→{{header|J}}) |
|||
Line 234:
J does not support "structures", nor "fields in a structure". Instead, J supports arrays. And, of course, J could have labels corresponding to the elements of an array representing the state (voltage, current, logical bit value, whatever) of each pin of a 9-pin RS-232 plug:
<lang j>labels=: <;._2]0 :0
CD Carrier detect
RD Received data
Line 245 ⟶ 244:
CTS Clear to send
RI Ring indicator
)</lang>▼
▲</lang>
=={{header|OCaml}}==
|