pTAL Reference Manual (H06.08+)
Contents
HP pTAL Reference Manual—523746-006
xix
Examples (continued)
Examples (continued)
Example 9-8. SHARED2 Structures With SHARED8 Substructure 9-17
Example 9-9. SHARED8 Structure With SHARED2 Substructure 9-18
Example 9-10. Combining SHARED2 and SHARED8 Structures 9-18
Example 9-11. AUTO Field Alignment in Structure (Error) 9-19
Example 9-12. FIELDALIGN(SHARED2) and REFALIGNED(2) Directives 9-21
Example 9-13. Byte Offsets (Decimal) of Fields of a SHARED2 Structure 9-22
Example 9-14. Filler Forcing Alignment in a SHARED8 Structure 9-24
Example 9-15. Structure With SHARED2 Field Alignment 9-25
Example 9-16. Structure With SHARED8 Field Alignment 9-25
Example 9-17. Optimized Structure With SHARED8 Field Alignment 9-25
Example 9-18. Structures That Need Filler 9-26
Example 9-19. Structure Field Crossing an Even-Byte Address (Error) 9-26
Example 9-20. Structure That Needs Filler 9-26
Example 9-21. SHARED8 Structure With Misaligned UNSIGNED Fields 9-27
Example 9-22. SHARED8 Structure With Correctly Aligned UNSIGNED Fields 9-27
Example 9-23. REFALIGNED Clause With Structure Pointers 9-28
Example 9-24. REFALIGNED Clause 9-28
Example 9-25. Default Reference Alignment 9-29
Example 9-26. REFALIGNED(2) 9-30
Example 9-27. REFALIGNED(8) 9-31
Example 9-28. VOLATILE Attribute 9-33
Example 9-29. Template Structure Declaration 9-37
Example 9-30. Template Structure With STRUCTALIGN(MAXALIGN) 9-37
Example 9-31. Referral Structure That References a Template Structure 9-39
Example 9-32. Simple Variables Within a Structure 9-40
Example 9-33. Arrays Within a Structure 9-41
Example 9-34. Using a Zero-Length Array to Initialize a Structure 9-42
Example 9-35. Declaring Definition Substructures 9-44
Example 9-36. Declaring a Referral Substructure 9-46
Example 9-37. Filler Byte Declarations 9-47
Example 9-38. Filler Bit Declaration 9-47
Example 9-39. Simple Pointers Within a Structure 9-49
Example 9-40. Assigning Addresses to Pointers in Structures 9-50
Example 9-41. Assigning Addresses to Pointers in Structures 9-51
Example 9-42. Declaring a Structure Pointer Within a Structure 9-53
Example 9-43. Simple Variable Redefinition 9-55
Example 9-44. Array Redefinition 9-56
Example 9-45. Definition Substructure Redefinition 9-58










