What's the difference between 'int' and 'INT' ( lower/upper case)

I get prompts for either when I’m adding code.
Particle.variable reference shows it as capitals but elsewhere int is just used as lower case.

INT is (roughly) a constant that tells the function Particle.variable() how to treat the variable that you’ve provided a pointer to in the second parameter of the parameter list.
int is a C key word that denotes a variable type.

You can create a variable by writing

int myIntVar;

but you can’t write

INT myIntVar;

For more info about INT have a look at the open source repo
https://github.com/spark/firmware/blob/develop/system/inc/system_cloud.h

1 Like

This is a great point, and I can see why they are confusing. We will eventually be removing the need for INT and instead simply writing

int myvar;

void setup()
{
   Particle.variable("myvar", myvar);
}

Will be sufficient, with no need for & which also adds confusion. Good to keep things simple!