[TxMt] Re: LaTeX Bundle

Caius Durling caius at caius.name
Sun Dec 6 11:39:50 UTC 2009


On 6 Dec 2009, at 11:15, Alain Matthes wrote:

> In the code about numprint, you use "puts" instead of "print". Why?
> 
> My book gives "puts" equivalent to $stdout.puts(obj,..)
> and "print" prints each object in turn to $stdout.

puts() appends a newline to the object unless it already has one.
print() doesn't.

> And why do you use "unless" in the code for numprint and not here ?


Not read the other code, but probably because he's first checking for the existence of something, and thus wanting the if to bail out at that point before checking the second statement.

C
---
Caius Durling
caius at caius.name
+44 (0) 7960 268 100
http://caius.name/




More information about the textmate mailing list