The integration of S-Lang into the Chandra Interactive Analysis of Observations (CIAO) infrastructure has transformed the capabilities of CIAO. There are several ways to use S-Lang. One is to write a S-Lang function which can be called from C/C++, CIAO applications, or any S-Lang prompt. Another is to write a C/C++ program which is made into a S-Lang intrinsic, allowing it to be called from any S-Lang script. The key element is that a C/C++ or CIAO application can call a S-Lang function/intrinsic, and that a S-Lang function/intrinsic can call a C/C++ or CIAO application. To use this capability, data must be exchanged between the C/C++ space and S-Lang space. This paper describes some of the mechanisms available for that data exchange. These mechanisms are illustrated through simple C/C++ and S-Lang program pairs, the S-Lang intrinsic methodology used by the CIAO S-Lang function ``univar'', and the use of the VARMM library by CIAO functions: Chandra Imaging and Plotting Software (ChIPS) UNIVAR, and the Graphical File Browser (PRISM) ``histogram''.
Astronomical Data Analysis Software and Systems (ADASS) XIII
- Pub Date:
- July 2004