Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Pascal/HP-UX Programmer's Guide > Chapter 8 Procedure Options

UNRESOLVED

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The UNRESOLVED procedure option prevents the compiler/linker/loader from resolving a routine until the program calls it. The routine must be at level one.

To resolve a routine is to associate it with its system name. Calling an OPTION UNRESOLVED routine implicitly resolves it at run-time, before it is called. The routine must be resolvable.

Alternatively, an OPTION UNRESOLVED routine can be explicitly resolved by calling the predefined function addr with the routine name as its parameter. Then addr returns a routine reference that can be assigned to a routine variable and called with the predefined procedure call or fcall. If the routine cannot be resolved, addr returns nil.

Example

PROGRAM p (output);

VAR
pv : PROCEDURE;

PROCEDURE p
OPTION UNRESOLVED;
EXTERNAL;

BEGIN {p}
p; {This ...}

call(addr(p)); {is equivalent to this ...}

pv := addr(p); {and this}
call(pv);
END. {p}
NOTE: On the HP-UX operating system, the UNRESOLVED option causes the addr function to return nil whether or not the specified routine is resolved.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.