On 08 May 2010, at 23:09, Felipe Monteiro de Carvalho wrote:
> FPC automatically does name mangling in your procedures, I guess your
> procedure really looks currently like:
>
> function _strlen(s: pansichar): integer; cdecl name 'MYUNIT$_STRLEN';
No, it does not. cdecl always results in C name
On 08 May 2010, at 21:37, moic...@gmx.de wrote:
> I have a C file which I want to link statically into my FreePascal
> application. The C code is mostly self-contained, except for a few simple
> calls to the C runtime, one of them being "_strlen".
>
> Now "_strlen" is a simple enough function
FPC automatically does name mangling in your procedures, I guess your
procedure really looks currently like:
function _strlen(s: pansichar): integer; cdecl name 'MYUNIT$_STRLEN';
Or even greater, with parameter type info and stuff. I would recommend
that you declare it as:
function _strlen(s: pa
Hi,
I have a C file which I want to link statically into my FreePascal application.
The C code is mostly self-contained, except for a few simple calls to the C
runtime, one of them being "_strlen".
Now "_strlen" is a simple enough function to rewrite it in Pascal, and so I
did. However, FreePa
Hello FPC-Pascal,
Saturday, May 8, 2010, 4:42:46 PM, you wrote:
VH> So, apart from a possibly more optimized implementation (like
VH> not changing the allocated memory size on each single
VH> insertion/deletion) how do you come up with the idea that adding
VH> another layer would make it faster?
Hello FPC-Pascal,
Saturday, May 8, 2010, 5:07:12 PM, you wrote:
JM> And depending on the usage patterns and the size of the
JM> elements stored in the array, it probably can be. That's all he
JM> was saying, and only as a side remark in the context of the
JM> discussion (which was meanly to steer
Graeme Geldenhuys wrote:
On 8 May 2010 15:53, Lee Jenkins wrote:
Does fpDoc per chance understand the markup used by pasdoc? Specifically, I
used comments like this:
fpdoc doesn't use comments from inside the source code. Instead it
reads the comments from an external XML file and merging it
On 8 May 2010 15:53, Lee Jenkins wrote:
>
> Does fpDoc per chance understand the markup used by pasdoc? Specifically, I
> used comments like this:
fpdoc doesn't use comments from inside the source code. Instead it
reads the comments from an external XML file and merging it with the
source code t
On 08 May 2010, at 16:42, Vinzent Höfler wrote:
>> 1)
>> TheArray: array of ItemArray;
>> AnyItem: ItemOfArray;
>> [...]
>> for j:=0 to 1000 do begin
>> SetLength(TheArray,j+1);
>> TheArray[j]:=AnyItem;
>> end;
>> [...]
>
> About 1000 GetMem operations (and 1000 assignments which aren't ther
> 1)
> TheArray: array of ItemArray;
> AnyItem: ItemOfArray;
> [...]
> for j:=0 to 1000 do begin
>SetLength(TheArray,j+1);
>TheArray[j]:=AnyItem;
> end;
> [...]
About 1000 GetMem operations (and 1000 assignments which aren't there in the
code below, so I won't count them).
> Now h
Does fpDoc per chance understand the markup used by pasdoc? Specifically, I
used comments like this:
{: Particularly useful when applied to THusband or TBoyfriend. }
ICleaner interface
procedure CleanAfterSelf;
end;
{: Particularly useful when applied to TWife or TGirlfriend. }
IGymnast =
Hello FPC-Pascal,
Saturday, May 8, 2010, 1:26:09 PM, you wrote:
>> But it is faster than inserting elements in a dynamic array (unless
>> reference counted ones) because it usually moves less amount of data
>> (4/8 bytes per element).
VH> Implementing a dynamic array via a list implementation whi
> c> TList wraps TFPList, which is based internally on an array. So access
> c> is fast; insertion, deletion not.
>
> But it is faster than inserting elements in a dynamic array (unless
> reference counted ones) because it usually moves less amount of data
> (4/8 bytes per element).
Implementing
Denis,
you need to get up to speed on , since this is one of the
fundamental (and better) differences of pascal. You'll find the typing
system actually helps you a lot.
FYI, class is one of the possible types. Basically in Pascal, some
types are basic: integer, real, some types are structur
14 matches
Mail list logo