Compound data type: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
|||
Line 2,772: | Line 2,772: | ||
<!-- context is a circle node. Children are accessed using a path-like notation (hence the name "XPath"). --></lang> |
<!-- context is a circle node. Children are accessed using a path-like notation (hence the name "XPath"). --></lang> |
||
<fo:block>Circle center = <xsl:value-of select="point/x"/>, <xsl:value-of select="point/y"/></fo:block> |
<fo:block>Circle center = <xsl:value-of select="point/x"/>, <xsl:value-of select="point/y"/></fo:block> |
||
=={{header|Z80 Assembly}}== |
|||
We'll declare the following C struct: |
|||
<lang C>struct Point{ |
|||
char x; |
|||
char y; |
|||
}</lang> |
|||
and then execute the following C code as Z80 Assembly below. |
|||
<lang C>struct Point myPoint; |
|||
myPoint.x = 3; |
|||
myPoint.y = 5;</lang> |
|||
<lang z80>;I'm arbitrarily choosing &1100 as the memory location of our Point variable. |
|||
ld hl,&1100 |
|||
ld (hl),3 |
|||
inc hl |
|||
ld (hl),5 |
|||
ret</lang> |
|||
=={{header|zkl}}== |
=={{header|zkl}}== |