The result from executing the programs above is 2, because the packages are loaded in
order.
In the following example, PROC PROTO adds a third package and includes it in PROC
FCMP locally, keeping the CMPLIB= system option set as above:
proc proto package = work.p3.test3;
typedef struct { int a; int b; } AB_t;
#define NUM 3;
int p3(void);
externc p3;
int p3(void)
{
return NUM;
}
externcend;
run;
proc fcmp libname = work.p3;
x = p1();
put "Should be 3: " x=;
run;
In this example, the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.