/*-------------------------------------------------------------------+ | Copyright (c) 1995, SAS Institute Inc. | | Unpublished - All Rights Reserved | | S A S / C S A M P L E | | | | NAME: PASC2CP | | LANGUAGE: PASCAL | | PURPOSE: THIS EXAMPLE DEMONSTRATES A PASCAL PROGRAM CALLING | | A C FUNCTION. | | IT CONSISTS OF SAMPLE LIBRARY MEMBERS | | PASC2CC, PASC2CP, AND PASCAL2C. | | MVS - | | COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(PASCAL2C). | | LINK: USE JCL PROVIDED IN SAMPLE.AUX(PASCAL2C). | | EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(PASCAL2C). | | TSO - | | COMPILE: PASCAL - USE PASCAL COMPILER. | | C - LC370C PASC2CC USING INDEP OPTION. | | LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PASCAL2C). | | EXECUTE: CALL.LOAD(PASCAL2C) | | CMS - | | COMPILE: PASCAL - USE PASCAL COMPILER. | | C - LC370 PASC2CC USING INDEP OPTION. | | LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PASCAL2C). | | EXECUTE: CALL PASCAL2C | | 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) | +-------------------------------------------------------------------*/ PROGRAM PASCAL2C; CONST STRSIZE = 30; TYPE PARMSTR = STRING(STRSIZE); VAR TOKEN : INTEGER; ERRFLAG : INTEGER; procedure CFMWK(const LANG : STRING; const COPTS : STRING; const ILCOPTS : INTEGER; var TOKEN : INTEGER); EXTERNAL; procedure DCFMWK(const TOKEN : INTEGER; var ERRFLAG : INTEGER); EXTERNAL; procedure CPROG; EXTERNAL; BEGIN CFMWK('PASCAL.','.', 1, TOKEN); CPROG(); DCFMWK(TOKEN, ERRFLAG); END.