Additional Topics > External Development Guide > IDLInternals - Miscellaneous > Terminal Information

# Terminal Information

The global variable IDL_FileTerm is a structure of type IDL_TERMINFO:

typedef struct {

char *name; /* Name Of Terminal Type */

char is_tty; /* True if stdin is a terminal */

int lines; /* Lines on screen */

int columns; /* Width of output */

} IDL_TERMINFO;

Note: Under operating systems that do not support the concept of a terminal (Microsoft Windows) the name and is_tty fields are not present.

IDL_FileTerm is initialized when IDL is started. Few, if any, user routines will need this information, because user routines should not do their own I/O. User routines that must do their own I/O should use this variable instead of making assumptions about the output device.

Note: Under Microsoft Windows, the IDL_FileTerm is not accessible outside of the IDL sharable library, and cannot be directly accessed by user code. Instead, use the functions described in the following section.

## Functions for Returning IDL_FileTerm Variable Values

The following functions can be used to return values from the IDL_FileTerm variable. They return the same information contained in the global variable, but in a functional form. This is the preferred way to access the IDL_FileTerm information, as it will work on any platform.

### char *IDL_FileTermName(void)

This function returns the value of IDL_FileTerm.name. This function is only available under UNIX.

### int IDL_FileTermIsTty(void)

This function returns the value of IDL_FileTerm.is_tty. This function is only available under UNIX.

### int IDL_FileTermLines(void)

This function returns the value of IDL_FileTerm.lines.

### int IDL_FileTermColumns(void)

This function returns the value of IDL_FileTerm.columns.