Re: numeric value replacement
Attila Szegedi <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Yeah - I'm sorry, but I can't understand the problem either. How about
you show us a snippet of template code, show us what output (or error)
it produces, and describe what would you expect instead?
Attila.
On 2008.06.05., at 10:43, Daniel Dekany wrote:
> Thursday, June 5, 2008, 7:12:08 AM, Samy123 wrote:
>
>> Hi-
>> Is there any way to replace value of a number with the desired
>> value..
>> for ex. I am having a following line in the template
>> The condition is ${120}.
>>
>> And the value of 120 is stored in the string as "for number a
>> specific
>> number".
>> Now how can I replace the value of 120 with the string?
>> As of now while running the freemarker,it is printing the number
>> 120 as it
>> is and not replacing with the string.
>
> You may need to rephrase this whole question because certainly nobody
> will understand it. I don't understand it at least. As ${aNumber} will
> be replaced in the output with a character sequence, the value of
> aNumber will be converted to string without asking. If you want to
> convert a number to a string inside a more complex expression, like in
> ${iNeedAString(aNumber)}, then you should write aNumber?c or
> aNumber?string, depending on whether you want "computer audience" or
> "human audience" formatting. See:
> http://freemarker.org/docs/ref_builtins_number.html
>
>> (tested on 2.1.12 of freemarker).
>>
>> Thanks,
>> ~Samir
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php