◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── See also: TYPEDEF Directive Description: Use TYPEDEF to ■ Define types for procedure arguments in PROC, PROTO, and INVOKE statements. ■ Define types used in high-level expressions such as .IF, .WHILE, and .REPEAT. ■ Define pointer types so that CodeView can give appropriate information about the pointer. ■ Define the types for procedure arguments in procedure prototypes. Typical TYPEDEFs: CHAR TYPEDEF BYTE ; Rename an existing type PCHAR TYPEDEF PTR CHAR ; Create a pointer type PWORD TYPEDEF PTR WORD ; Create a pointer type PPWORD TYPEDEF PTR PWORD ; Create a complex pointer ; type PMYSTRUCT TYPEDEF PTR MYSTRUCT ; Create pointer type to ; structure or union PPROTO TYPEDEF PROTO \ NEAR C arg1:byte arg2:word ; Define proc prototype PFUNCT TYPEDEF PTR PPROTO ; Define pointer to proc ; prototype Typical uses of TYPEDEFs: user CHAR "Jill" ; Use new type as initializer Puser PCHAR user ; Initialize a pointer task PROC myvar:PMYSTRUCT ; Pass pointer to structure EXTERNDEF ppw:PPWORD ; Define external with user ; type proctbl PFUNC Up, Down, Home ; Initialize procedure table ∙ ∙ ∙ INVOKE proctbl[bx], pos ; Call procedure from table -♦-