Jump to content

Type detection: Difference between revisions

no edit summary
(→‎{{header|Wren}}: Updated - output didn't even match input before!)
No edit summary
Line 2,238:
System.Double
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>
 
338

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.