% This file is embedded in datatool-user.pdf version 3.4.5 2026-08-23
% Example 34 Data Type Conditionals for use with ifthen
% Label: "ex:DTListype"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool-base} 
\begin{document}
1,234.0: \ifthenelse{\DTLisint{1,234.0}}{int}{not int}. 

1,234: \ifthenelse{\DTLisint{1,234}}{int}{not int}. 

1,234.0: \ifthenelse{\DTLisreal{1,234.0}}{real}{not real}. 

1,234: \ifthenelse{\DTLisreal{1,234}}{real}{not real}. 

Compare: \$1,234: \DTLifcurrency{\$1,234}{currency}{not currency}. With: \$1,234: \ifthenelse{\DTLiscurrency{\$1,234}}{currency}{not currency}. 

\DTLnewcurrencysymbol{\protect\$}% 
 \$1,234: \ifthenelse{\DTLiscurrency{\$1,234}}{currency}{not currency}. 

1.234,0: \ifthenelse{\DTLisnumerical{1.234,0}}{numerical}{not numerical}; \ifthenelse{\DTLisstring{1.234,0}}{string}{not string}. 

\DTLsetnumberchars{.}{,}% 
 1.234,0: \ifthenelse{\DTLisnumerical{1.234,0}}{numerical}{not numerical}; \ifthenelse{\DTLisstring{1.234,0}}{string}{not string}. 

Empty: \ifthenelse{\DTLisnumerical{}}{numerical}{not numerical}; \ifthenelse{\DTLisstring{}}{string}{not string}. 
\end{document}
