---
name: "PGAGetDataType"
section: "8"
platform: "linux"
package: "pgapack"
version: "1.1.1-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/PGAGetDataType"
---

# PGAGetDataType(8)

Returns the data type used by the given context.

## NAME

PGAGetDataType - Returns the data type used by the given context.

## INPUT PARAMETERS

- ctx

  \- context variable

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
int  PGAGetDataType(ctx)
PGAContext *ctx
```

## LOCATION

pga.c

## EXAMPLE

```
Example:
PGAContext *ctx;
int datatype;
:
datatype = PGAGetDataType(ctx);
switch (datatype) {
case PGA_DATATYPE_BINARY:
printf("Data Type = PGA_DATATYPE_BINARY0);
break;
case PGA_DATATYPE_CHARACTER:
printf("Data Type = PGA_DATATYPE_CHARACTER0);
break;
case PGA_DATATYPE_INTEGER:
printf("Data Type = PGA_DATATYPE_INTEGER0);
break;
case PGA_DATATYPE_REAL:
printf("Data Type = PGA_DATATYPE_REAL0);
break;
case PGA_DATATYPE_USER:
printf("Data Type = PGA_DATATYPE_USER0);
break;
}
```
