Logo

Programming-Idioms

History of Idiom 94 > diff from v24 to v25

Edit summary for version 25 by programming-idioms.org:
[Lua] Comment emphasize

Version 24

2016-10-26, 12:12:01

Version 25

2016-11-10, 08:46:15

Idiom #94 Print type of variable

Print the name of the type of x. Explain if it is a static type or dynamic type.

This may not make sense in all languages.

Idiom #94 Print type of variable

Print the name of the type of x. Explain if it is a static type or dynamic type.

This may not make sense in all languages.

Code
print(type(x))
Code
print(type(x))
Comments bubble
print the dynamic type of x
Comments bubble
This prints the dynamic type of x