Jump to content

Type detection: Difference between revisions

→‎PHP: Added zkl
(Add a task description)
(→‎PHP: Added zkl)
Line 43:
 
* [http://php.net/manual/en/function.is-array.php is_array()]
 
=={{header|zkl}}==
<lang zkl>fcn processText(data_or_fileName){ // unknown
if (data_or_fileName.isType(String)) // == .isType("")
data_or_fileName=File(data_or_fileName,"rb").read(); //-->Data
text:=text.text; //-->String
doTheActualTextProcessing(text);
}</lang>
If an int is passed in, (123).text --> "123", other objects might throw an exception.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.