473,395 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I write printf("Content-type:%s\r\n\r\n",type)

Hello,

I hope I am not too OT.

How do I write printf("Content-type:%s\r\n\r\n",type) in Pascal ?

I am translating a library of mine written in C into Pascal. How do
I write \r\n\r\n in Pascal?
I tried with write(chr(13)+chr(10)+chr(10)+chr(13)), or
write(#13#10#13#10), but I always get "Premature end of script headers"

I need it to write a CGI program in FreePascal
Thanks in advance

Francesco
--
Teaching OnLine
Corsi online di programmazione
Php, Asp, C, C++, Visual Basic, Delphi
Linux Shell Programming
------------------------------------
http://www.teachingonline.it

Nov 15 '05 #1
3 2641
Lampa Dario wrote:
Hello,

I hope I am not too OT.

How do I write printf("Content-type:%s\r\n\r\n",type) in Pascal ?


I'm afraid you are extremely off-topic.

Ask in the appropriate Pascal group, since it's a question about Pascal.

--
Chris "electric hedgehog" Dollin
Logic is rational /re/construction. Life is construction.
Nov 15 '05 #2
In article <Oa********************@news3.tin.it>,
Lampa Dario <la**@dario.it> wrote:
Hello,

I hope I am not too OT.

How do I write printf("Content-type:%s\r\n\r\n",type) in Pascal ?


We can help you with understanding the C bit here, though it seems like
you already know what it's doing, so that won't get you any farther.

You want the people who know Pascal. They (even the ones who also know
C and also read here) are best found in a newsgroup that discusses Pascal.

comp.lang.pascal, if it exists, would be the first place I'd look.
dave

--
Dave Vandervies dj******@csclub.uwaterloo.ca
Not only has Richard done something *useful* for the C community,
his worth is measured in pence and pounds, not dimes and dollars.
--Chris Dollin in comp.lang.c
Nov 15 '05 #3
Lampa Dario wrote:

I hope I am not too OT.
This is a C group and you are asking a pascal question..

How do I write printf("Content-type:%s\r\n\r\n",type) in Pascal ?

I am translating a library of mine written in C into Pascal. How do
I write \r\n\r\n in Pascal?
I tried with write(chr(13)+chr(10)+chr(10)+chr(13)), or


Note that in C, \r\n\r\n is NOT necessarily equivalent to
13 10 13 10.

If you are in Windows, then printf("\r\n\r\n"); will get you
13 13 10 13 13 10, because text-mode streams apply conversions
to '\n' (ie. writing '\n' gives '\r\n', and reading '\r\n'
gets you '\n').

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nickolausp | last post by:
When embedding a JavaScript document.write within a JavaScript document.write in Netscape 4.x (example below), the text is written out of logical order. <script type="text/javascript"> <!--...
5
by: Eric | last post by:
Is it possible? I'm trying to add to the current page -- but add at a specific point. Can add HTML tags from javascript midway through the page (at a place I specify) without erasing the existing...
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
9
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
5
by: mike | last post by:
Is there any way I can change the content type when I open a new window other than opening a script in the open statement? mywin =...
4
by: leslie_tighe | last post by:
Hello, I have a method on a com+ object that is returning an array of objects. I know the array is popluated as calls to check the ubound and lbound show valid values. However, any calls to...
1
by: Phil Sandler | last post by:
Hello all, Thanks in advance for any help with this. I am trying to get sample code to run from Michael Russell's excellent article on removing whitespace:...
2
kamill
by: kamill | last post by:
i need to write content of one text file into another text file. My code is working ,if i choose both files from same directory where my program reside..BUT,its not working if i select files from...
6
by: Luke Davis | last post by:
I can't figure this out, why am I getting ")" expected and ";" expected on this line? Response.Write("<input type=""hidden"" name=""item_number"" value="".COM, MLSNumber"">"); - L
1
by: anupamaavadutha | last post by:
hi all, iam new to javascript. i have problem calling javascript functions.iam designing a calender page.here is my code. <%@ page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.