OK, how about this then:

<CFSET Plural = "s">
<CFIF GetGifts.RecordCount IS 1>
   <CFSET Plural = "">
</CFIF>

[etc]


> How about:
> 
> <CFIF GetGifts.RecordCount IS 1>
>   <CFSET Plural = "">
> <CFELSE>
>   <CFSET Plural = "s">
> </CFIF>
> 
> <CFOUTPUT>
> #GetGifts.RecordCount# Gift#Plural#
> </CFOUTPUT>
> 
> Regards: Ayudh
> 
> +--------------------------------------------------------------+
> | Turn on your Revenue Stream...                               |
> | Bolt on a Virtual Cash Register to your e-commerce site now. |
> | VeriPay from Xilo Online: http://www.xilo.com                |
> +--------------------------------------------------------------+
> ----- Original Message -----
> From: "Andrew Dickinson" <[EMAIL PROTECTED]>
> To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, April 02, 2003 09:41
> Subject: [cfaussie] How to kill a space ?
> 
> 
> > Should be easy.
> >
> > I've written some code to add an "s" on the end of a word if the 
> > record count is either zero or plural.
> >
> > The following code works fine ........
> >
> > Fragment 1
> > #GetGifts.RecordCount# Gift<CFIF GetGifts.RecordCount IS NOT 
> > 1>s</CFIF>
> >
> > e.g.
> > 0 Gifts
> > 1 Gift
> > 2 Gifts
> >
> > ..... but when I split the line, and therefore make the 
> code easier to 
> > read .....
> >
> > Fragment 2
> > #GetGifts.RecordCount# Gift
> >            <CFIF GetGifts.RecordCount IS NOT 1>
> >            s
> >            </CFIF>
> >
> > .... it goes all goofy
> >
> > e.g.
> > 0 Gift s
> > 1 Gift
> > 2 Gift s
> >
> > How can I keep my nice formatting in fragment 2, but not show that 
> > annoying space before the "s" ?
> >
> > ---
> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To 
> > unsubscribe send a blank email to
> [EMAIL PROTECTED]
> >
> > MX Downunder AsiaPac DevCon - http://mxdu.com/
> 
> 
> ---
> You are currently subscribed to cfaussie as: 
> [EMAIL PROTECTED] To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> 
> MX Downunder AsiaPac DevCon - http://mxdu.com/
> 



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to