Dadep
Dadep

Reputation: 2788

what is the maximum length of variable name in arduino?

I would like to know :

Thanks

Upvotes: 0

Views: 1229

Answers (1)

MSalters
MSalters

Reputation: 179779

Apparently, if there's any, it is over a megabyte (!!).

That's pretty big, but variable names are meant for your compiler. The compiler translates variable names into addresses, and that address will be 2 or 4 bytes. The compiler runs on your PC where there is plenty of memory, and your Arduino just deals with the address.

Since the compiler runs on your PC, the name length doesn't depend on the Arduino model.

Upvotes: 3

Related Questions