About
Shop
LaTeX
Free Software
Books
News
Contact
Blog
News (2017-11-08): glossaries-extra v1.22 released.

Bug Tracker

ID 15
Status Closed (fixed)
Category datatool
Version 2.11
Interpreter N/A
Summary DTLgetvalueforkey fails when key=0

Report

Thank you for datatool!; it has revolutionized my workflow.

Please see the attached MWE.. pdflatex output looks like:

5.045455
Undefined Value
23.227273
32.318182
41.409091

MWE

\documentclass[11pt,letterpaper]{article}

\usepackage{filecontents}
\begin{filecontents*}{data.out}
LOGDISTANCE,distance,barnum
-1,0.100000,5.045455
0,1.000000,14.136364
1,10.000000,23.227273
2,100.000000,32.318182
3,1000.000000,41.409091
4,10000.000000,50.500000
\end{filecontents*}

\usepackage{datatool}

\listfiles

\begin{document}

\DTLloadrawdb{MyDBase}{data.out}

\DTLgetvalueforkey\Onekm{barnum}{MyDBase}{LOGDISTANCE}{-1} \Onekm

\DTLgetvalueforkey\Onekm{barnum}{MyDBase}{LOGDISTANCE}{0} \Onekm

\DTLgetvalueforkey\Onekm{barnum}{MyDBase}{LOGDISTANCE}{1} \Onekm

\DTLgetvalueforkey\Onekm{barnum}{MyDBase}{LOGDISTANCE}{2} \Onekm

\DTLgetvalueforkey\Onekm{barnum}{MyDBase}{LOGDISTANCE}{3} \Onekm

\end{document}

Comment from OP
Date: 2013-03-15 00:45:29 CDT

Thanks!

Evaluation

The test for null was incorrectly interpreting 0 as a null value. Fixed in v2.13 (2013-01-15).

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes". (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

Comments

If you would like to add a comment regarding this bug report, please fill in the form below, but don't use it for a different bug or feature request, even if it's related. Instead fill out a new bug report or feature request. (If you want to link it to this report, make a note of the ID number at the top of the page.)

Name (Optional)
Comment

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace font[/tt]
[url]web address[/url]

which will be converted to:

<pre>Displayed verbatim</pre>
<tt>monospace font</tt>
<a href="web address">
web address</a>

I'm sorry, some spammers have cracked the captcha and genuine comments were being hidden in the midst of spam, so I've replaced the captcha with this test: Please enter the ID number of this report in the confirm ID box below.

Confirm ID: (The number at the top of this page.)

Return to Search Results


The free software provided here (including my class files and packages on CTAN) are funded by my book sales. While I'm keen to remove bugs from my code, book production has to take priority over bug fixes, so please don't expect a rapid response.

Version numbers that end with "b" indicate a beta (prototype) release. Version numbers that end with "a" indicate an alpha (unstable) release.

© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Site Map FAQs