Jump to content

Memory layout of a data structure: Difference between revisions

m
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
labels=: <;._2]0 :0
CD Carrier detect
RD Received data
Line 245 ⟶ 244:
CTS Clear to send
RI Ring indicator
)</lang>
)
</lang>
 
=={{header|OCaml}}==
892

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.