Please send your "main" unit (or your small project compacted in zip).
2011/11/1 Luciano de Souza :
[..]
--
Silvio Clécio
===
Blog -
Twitter -
Facebook -
LazSolutions -
Lazarus-BR -
===
* Conheça noss
Hello listers,
I am trying to understand how to create some code using Custcgi.
However, the following peace is not clear for me concerning to
"getnextpathinfo". Let's see:
program cgiproject1;
{$mode objfpc}{$H+}
uses
HTTPDefs, custweb, custcgi, main;
type
{ TMyCGIHandler }
TMyCGI
Am 01.11.2011 10:30, schrieb Juha Manninen:
> WriteStr (S, N);
>
>
> Thanks guys!
> WriteStr() was the function I was looking for.
> I found some places in Lazarus code where it is used but not
> many. Martin's debugger code has some.
> I think many lookup string arrays in Lazarus code could
On 01 Nov 2011, at 10:30, Juha Manninen wrote:
>> WriteStr (S, N);
>>
>
> Thanks guys!
> WriteStr() was the function I was looking for.
You can also use the plain str() procedure.
Jonas
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
h
On Tue, 1 Nov 2011, Ludo Brands wrote:
On Tue, Nov 1, 2011 at 9:04 AM, Ludo Brands
wrote:
Note the "per the HTML specs". HTTP specs aren't that strict.
But what exaxtly do these specs ban? Because I am sending via
XMLHttpRequest in JavaScript, and there you can specify any
mime-type that y
2011/11/1 Juha Manninen :
>> WriteStr (S, N);
>
> Thanks guys!
> WriteStr() was the function I was looking for.
> I found some places in Lazarus code where it is used but not many. Martin's
> debugger code has some.
> I think many lookup string arrays in Lazarus code could be replaces
> with Write
>
> WriteStr (S, N);
>
Thanks guys!
WriteStr() was the function I was looking for.
I found some places in Lazarus code where it is used but not many. Martin's
debugger code has some.
I think many lookup string arrays in Lazarus code could be replaces
with WriteStr. It would reduce code size and i
On Tue, Nov 1, 2011 at 8:39 AM, Felipe Monteiro de Carvalho
wrote:
> begin
> SetLength(DataStr, M.Size);
> M.ReadBuffer(DataStr[1], M.Size);
> ContentFields.Text := DataStr;
> end;
Actually this code is wrong, for it to be proper it would need to
first check if the mime-type
> On Tue, Nov 1, 2011 at 9:04 AM, Ludo Brands
> wrote:
> > Note the "per the HTML specs". HTTP specs aren't that strict.
>
> But what exaxtly do these specs ban? Because I am sending via
> XMLHttpRequest in JavaScript, and there you can specify any
> mime-type that you want. You can send any d
Hi,
This is code I wrote for converting 1, 2 or 3 digit numbers to string.
function NumtoString(N:integer):string;
var
c1, c2, c3: char;
begin
if (N<10) then
NumtoString := chr(N+48)
else if (N > 9) an
On Tue, November 1, 2011 08:41, Juha Manninen wrote:
Hi,
> I remember there is a way to get a string representation of an enumerated
> type directly without using a lookup string array, but I forgot the
> syntax.
> Lazarus uses only lookup arrays, maybe because the other syntax is new.
>
> How i
You can directly write enums with Write or WriteLn and convert enums
to strings with WriteStr.
program EnumStr;
{$mode objfpc}{$H+}
type
TColor = (cRed, cGreen, cBlue, cYellow);
function ColorToStr(C: TColor) : String;
begin
WriteStr(Result, C);
end;
var
Color : TColor;
begin
for Color
On Tue, Nov 1, 2011 at 9:04 AM, Ludo Brands wrote:
> Note the "per the HTML specs". HTTP specs aren't that strict.
But what exaxtly do these specs ban? Because I am sending via
XMLHttpRequest in JavaScript, and there you can specify any mime-type
that you want. You can send any data and I haven't
> >> So it seems that you MUST set the contenttype either to
> >> MULTIPART/FORM-DATA or APPLICATION/X-WWW-FORM-URLENCODED.
> >
> > Yes, this is as per the HTML specs.
>
> They actually prohibit sending arbitrary data? oh, boy, these
> people like rules and inneficiency =D But there must be
> s
One option is RTTI:
http://wiki.lazarus.freepascal.org/Runtime_Type_Information_(RTTI)#Converting_a_enumerated_type_to_a_string
--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailm
Hello,
Ok, it seams that I found a workaround. It works correctly if I use this:
lData := ARequest.Content;
instead of
lData := ARequest.ContentFields.Text;
It seams that the string is filled correctly, even if the TStringList
isn't filled.
I think this could be improved by adding this cod
Hi
I remember there is a way to get a string representation of an enumerated
type directly without using a lookup string array, but I forgot the syntax.
Lazarus uses only lookup arrays, maybe because the other syntax is new.
How is the syntax?
Juha
___
17 matches
Mail list logo