Type detection: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
(Type detection in FreeBASIC)
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(One intermediate revision by one other user not shown)
Line 18:
If not practical, show how the caller would coerce a type that can be passed to the library function.
<br><br>
 
=={{header|Arturo}}==
 
<syntaxhighlight lang="arturo">print type 2
print type "hello world"
print type [1 2 3]
 
print is? :integer 4
print is? :integer "hello world"
 
print is? :string "hello world"
print is? :string 7
 
print string? "boom"
print logical? true
print block? ["one" "two" "three"]</syntaxhighlight>
 
{{out}}
 
<pre>:integer
:string
:block
true
false
true
false
true
true
true</pre>
 
=={{header|ATS}}==
Line 2,344 ⟶ 2,373:
=={{header|Wren}}==
{{libheader|Wren-fmt}}
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt
 
var showType = Fn.new { |obj|
9,477

edits