Anonymous user
Memory layout of a data structure: Difference between revisions
Memory layout of a data structure (view source)
Revision as of 17:01, 20 November 2008
, 15 years ago→{{header|Python}}
Line 175:
=={{header|Python}}==
This task cannot really be done efficiently in Python, as there is no type analogous to bit fields. The
code below merely defines a dictionary with the pin names corresponding to entries in the dictionary.
# Controlling Fields in a Structure in Python▼
▲<python># Controlling Fields in a Structure in Python
rs232 = {
Line 204 ⟶ 205:
}
rs232["RD Received data"] = 1
print rs232["TC Transmit clock"]</python>
|