shouldn;t the delimiter be chr(12) or whatever it is?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Ian Skinner wrote:
> I have a text file that I am trying to loop over using the "NP form 
> feed, new page" character.  The ultimate goal is to output this text 
> file as a PDF with <cfdocument...> replacing that ASCII(12) character 
> with <cfdocumentitem type="pagebreak"/> tags.
>
> If I output the text file character by character I count 6 ascii(12) 
> characters.
> <pre>
> <cfscript>
> for (i=1; i <= len(report); i++)
> {
>     char = mid(report,i,1);
>    
>     if (asc(char) eq 12)
>         writeOutput('<strong>[' & asc(char) & ']</strong>' & char);
>     else
>         writeOutput('[' & asc(char) & ']' & char);
> }
> </cfscript>
> </pre>
>
> If I loop over the text file delimiting on the asc(12) character, I get 
> 41 items rather then the expected 7.
> <cfoutput>
> <pre>
> <cfloop list="#report#" delimiters="#asc(12)#" index="page">
>     #page#
>     <hr/>
> </cfloop>
> </pre>
> </cfoutput>
>
> Any idea why my code is not producing consistent results?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302968
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to