/*-------------------------------------------------------------------+
|                Copyright (c) 1995, SAS Institute Inc.              |
|                  Unpublished - All Rights Reserved                 |
|                    S A S / C   S A M P L E                         |
|                                                                    |
|       NAME: PASCCXPC                                               |
|   LANGUAGE: C++                                                    |
|    PURPOSE: THIS EXAMPLE DEMONSTRATES A PASCAL PROGRAM CALLING     |
|             A C++ FUNCTION, PASSING A PARAMETER LIST.              |
|             IT CONSISTS OF SAMPLE LIBRARY MEMBERS                  |
|             PASCCXPC, PASCCXPP, AND PASCCXPM.                      |
| MVS -                                                              |
|    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(PASCCXPM).              |
|       LINK: USE JCL PROVIDED IN SAMPLE.AUX(PASCCXPM).              |
|    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(PASCCXPM).              |
| TSO -                                                              |
|    COMPILE: PASCAL - USE PASCAL COMPILER.                          |
|             C++ - LCXX  PASCCXPC USING INDEP OPTION.               |
|       LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PASCCXPM).  |
|    EXECUTE: CALL .LOAD(PASCCXPM)                           |
| CMS -                                                              |
|    COMPILE: PASCAL - USE PASCAL COMPILER.                          |
|             C++ - LCXX PASCCXPC USING INDEP OPTION.                |
|        LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PASCCXPM). |
|     EXECUTE: CALL PASCCXPM                                         |
| MISC NOTES: THE FOLLOWING LSCL102 MESSAGES CAN BE IGNORED:         |
|   WARNING: CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(AMPXRETC)   |
|   WARNING: CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(AMPXHALT)   |
|   WARNING: CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(AMPXSEGE)   |
+-------------------------------------------------------------------*/
#include 

struct parmdef { short len; char text[30];};
typedef struct parmdef parmstruct;

extern "C" void cprog( parmstruct *parm1  )
  {
  cout << "Hello World PASCAL calling C++"<< endl;
  cout << "SUCCESSFUL: " << parm1->text << endl;
  }