Please enable JavaScript to view this site.

ESL Documentation

Navigation: ESL Documentation > ESL Programmers Guide

Using Data in External Formats

Scroll Prev Top Next More

Structures give you the ability to define data stored in formats not used by ESL, such as those used by C and COBOL, so that you can use the data in ESL programs, and also pass it to routines in other languages. The using clause for a field in a structure type definition lets you specify the external, non-ESL format in which the data is stored. ESL converts the external format to the ESL type you specify for the field, whenever the field is referenced in your program.

 

You specify how the data is to be converted depending on how it is stored. For some C language external formats, ESL supplies a default conversion to the ESL type specified for the field. If you want to use data stored in other external formats, you can write your own external conversion routine to convert the data between the external format and the ESL type, and specify the name of your conversion routine in the using clause for the field.