1. Script doesn't respect : puts(1,"\n")

The code below (CGI) works fine except that it's as though the 
puts(1, "\n")  isn't there....as the browser prints the (10) 
items read from the file in five cols of two 'lines' each ??

  
fn=open("bcare_remit.txt","r")
   if fn > 0 then
  	line = gets(fn)
   else
   	puts(1,"Unable to open the disk file\n")
        abort(1)
   end if
for i = 1 to 10 do
	puts(1,line[1..50])
	puts (1,"\n") <---------- this seemed to cause line feeds
                                  with HTML "puts"...but not here   
        line = gets(fn)
end for

new topic     » topic index » view message » categorize

2. Re: Script doesn't respect : puts(1,"\n")

John F Dutcher wrote:
> 
> 
> The code below (CGI) works fine except that it's as though the 
> puts(1, "\n")  isn't there....as the browser prints the (10) 
> items read from the file in five cols of two 'lines' each ??

Your browser requires "<br>" for line breaks, so try this:

puts(1,"<br>\n")

Doing it that way, it will display nicely/properly in your browser and
when you view the source.

> 	puts (1,"\n") <---------- this seemed to cause line feeds
>                                   with HTML "puts"...but not here   

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Script doesn't respect : puts(1,"\n")

use 

puts(1,"<br>") or
puts(1,"<p>")

instead

Michelle Rogers
----- Original Message ----- 
From: "John F Dutcher" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Monday, August 02, 2004 8:30 PM
Subject: Script doesn't respect : puts(1,"\n")


> 
> 
> posted by: John F Dutcher <John_Dutcher at urmc.rochester.edu>
> 
> 
> The code below (CGI) works fine except that it's as though the 
> puts(1, "\n")  isn't there....as the browser prints the (10) 
> items read from the file in five cols of two 'lines' each ??
> 
>   
> fn=open("bcare_remit.txt","r")
>    if fn > 0 then
>   line = gets(fn)
>    else
>    puts(1,"Unable to open the disk file\n")
>         abort(1)
>    end if
> for i = 1 to 10 do
> puts(1,line[1..50])
> puts (1,"\n") <---------- this seemed to cause line feeds
>                                   with HTML "puts"...but not here   
>         line = gets(fn)
> end for
> 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu