---
name: "JSIsAxisAllocated"
section: "3"
platform: "linux"
package: "libjsw-dev"
version: "1:1.5.5-1+b1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/JSIsAxisAllocated"
---

# JSIsAxisAllocated(3)

Axis number validation

## NAME

JSIsAxisAllocated - Axis number validation

## SYNTAX

\#include \<jsw.h\>

int JSIsAxisAllocated(\
\
         js\_data\_struct \**jsd*,\
\
         int *n*\
 )

## ARGUMENTS

- *jsd*

  Specifies the pointer to the joystick data structure, which should have been set up by a prior call to JSInit.

- *n*

  Specifies the axis number.

## DESCRIPTION

The JSIsAxisAllocated function checks if the given axis number *n* exists on the given *jsd* structure.

## RETURN VALUE

The JSIsAxisAllocated function returns zero if the axis does not exist or 1 if the axis does exist.

## SEE ALSO

[JSIntro(3)](/JSIntro/3.md) [JSIsButtonAllocated(3)](/JSIsButtonAllocated/3.md)
