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.
System.Console.WriteLine( x.GetType() );
(type x)
#include <typeinfo>
std::cout<<typeid(x).name();
import std.stdio: writeln;
writeln(typeid(x));
print(x.runtimeType);
[{_, type} | _] = IEx.Info.info(x) type
fmt.Printf("%T", x)
import "reflect"
fmt.Println(reflect.TypeOf(x))
import Data.Dynamic
print (dynTypeRep (toDyn x))
console.log (x == null ? x + '' : x.constructor.name);
console.log(typeof x);
System.out.println(((Object)x).getClass().getName());
import static java.lang.System.out;
var x = "abc"; out.println(x.getClass().getSimpleName());
println(x::class.simpleName)
(describe x)
print(type(x))
echo is_object($x) ? get_class($x) : gettype($x);
{$mode objfpc}{$H+} {$ModeSwitch ImplicitFunctionSpecialization } generic procedure PrintTypeOfX<T>(const X: T); var tk: TTypeKind; begin tk := System.GetTypeKind(X); writeln(tk); end;
print ref($x)||"SCALAR", "\n";
print(x.__class__)
puts x.class
#![feature(core_intrinsics)]
fn type_of<T>(_: &T) -> &'static str { std::intrinsics::type_name::<T>() } println!("{}", type_of(&x));
No security, no password. Other people might choose the same nickname.