Chapter Contents

Previous

Next
Using the indep Option for Interlanguage Communication

Introduction

This appendix explains how to use the indep compiler option to generate code that can be used in both simple and complex multilanguage programs.

The indep compiler option has two quite distinct uses. The first is to allow C code to be called directly from other high-level languages. The second is to avoid the repeated creation and destruction of the C framework when the SPE feature is used. This appendix describes the first use of the indep option. The second use is described in Systems Programming with the SAS/C Compiler.

Unless your multilanguage application is simple, you need to understand execution frameworks in order to use the indep option for interlanguage communication. This appendix describes what an execution framework is and then describes how to use indep to create the C execution framework and to switch between frameworks. A complete example, which uses indep to switch between the C and the PL/I frameworks, follows the description.

Most interlanguage applications use the normal C framework, which supports the entire SAS/C run-time library. In many cases, the techniques described in this appendix also can be used with the minimal SPE framework described in Systems Programming with the SAS/C Compiler. SPE is explicitly mentioned here only for exceptional cases where the SPE behavior differs from the full library behavior.

It is recommended that new multilanguage applications use the facilities described in the SAS/C Compiler Interlanguage Communication Feature User's Guide, rather than using indep directly, as described here. In most cases, these facilities are easier to use than using indep and are equally powerful.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.