Type detection: Difference between revisions

Content added Content deleted
(Type detection in FreeBASIC)
(added Arturo)
Line 18: Line 18:
If not practical, show how the caller would coerce a type that can be passed to the library function.
If not practical, show how the caller would coerce a type that can be passed to the library function.
<br><br>
<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}}==
=={{header|ATS}}==