Type detection: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 2,240: Line 2,240:
</pre>
</pre>


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