>Hex-Rays IDA Pro Page

Help index | Search

IDC: variables

All variables in IDC are automatic local variables (sic!). This means that function variables are created at the function entry and destroyed at the exit. Global variables do not exist.

A variable can contain:

  - a 32-bit signed long integer (64-bit in 64-bit version of IDA)
  - a character string
  - a floating point number (extra precision, up to 25 decimal digits)
A variable is declared this way:
  auto var;
This declaration introduces a variable named 'var'. It can contain a string or a number. All C and C++ keywords are reserved and cannot be used as a variable name. The variable is defined up to the end of the function.

NOTE: Processor register names can be used in the IDC scripts when the debugger is active.

NOTE: to emulate global scope variables you may use array functions and create global persistent arrays.

Index | Previous topic | Next topic