Hello all,

I read the velocity docs, and according to them I can
write the function below in two ways:

Method 1:
 
#macro(displayPositiveOnly $val)
        #if($val >= 0)
                $val
        #end
#end

Method 2:

#macro(displayPositiveOnly $val)#if($val >=
0)$val#end#end

And either way the output will be the same.  I have
tried both ways of defining the macro, and indeed both
ways have the same output.  However, both ways also
add about half a dozen extra spaces in front of $val,
which causes a problem.  Does Velocity have a bug in
it's white space removal?  Am I doing something wrong?

I am using Velocity version 1.4 that shipped with the
SpringFramework 1.1.2.  $val is an integer.

Thanks!
Rob


                
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to