Type detection: Difference between revisions

Content added Content deleted
(→‎{{header|Wren}}: Updated - output didn't even match input before!)
No edit summary
Line 2,238: Line 2,238:
System.Double
System.Double
System.Boolean
System.Boolean
</pre>

=={{header|Vlang}}==
<lang vlang>fn show_type<T>(a T) {
println('The type of $a is ${typeof(a).name}')
}

fn main() {
show_type(-556461841)
show_type('Rosetta')
show_type(7.4)
show_type(`s`)
show_type([0x32,0x22])
}</lang>

{{out}}
<pre>
The type of -556461841 is int
The type of Rosetta is string
The type of 7.4 is f64
The type of s is rune
The type of [50, 34] is []int
</pre>
</pre>