On Sun, Nov 13, 2011 at 1:39 AM, Rainer Stratmann
wrote:
> procedure getchars( p : pchar );
> var l : longint;
> begin
> l := length( p );
> end;
You cannot do length in a PChar, it has no length information. I think
this code is probably automatically converting the PChar to a Pascal
String and
On 13 Nov 2011, at 17:56, Graeme Geldenhuys wrote:
> On 12/11/2011, ik wrote:
>>
>> procedure foo(AClass : TStrings);
>> foo(MyStringList); // Will return an error that TStrings is expected ...
>>
>> I can not use TStringList as the parameter without casting it to TStrings.
>> But I do not und
On 13 Nov 2011, at 14:02, Rainer Stratmann wrote:
> Am Sunday 13 November 2011 02:15:07 schrieb leledumbo:
>> It works when {$LONGSTRINGS ON} or {$H+} directive exists. I think the
>> compiler treats functions receiving array of char (or pointer to it) as
>> ShortString when none of the directive
On Sun, Nov 13, 2011 at 5:56 PM, Graeme Geldenhuys
wrote:
> Luckily I could change my code to TStringList to work around the
> problem.
One can type-cast to get around the issue, so then method declarations
don't need to be changed:
foo(TStrings(MyStringList));
--
Felipe Monteiro de Carvalho
Hi list,
Trying to start documenting fpXMLXSDExport:
c:\development\fpc\bin\i386-win32\makeskel
--disable-private --emit-class-separator --update --package=fcl
--input=C:\development\Fpc\Source\packages\fcl-db\src\export\fpxmlxsdexport.pp
--output=fpxmlxsdexport.xml
MakeSkel - FPDoc skeleton XML d
Hi all,
In case you didn't know and are interested, there is an online
artificial intelligence competition [1] that lets you program an ant
colony that fights other colonies.
There's a FreePascal starter kit available as well.
You can test your program against others now; your submission needs t
While testing an updated version of nYume (aservia) I found that the
program is leaking thread handles on Ms Windows. The program uses
BeginThread and EndThread calls.
However, when I add CloseThread() right before EndThread(, the program no
longer leaks handles. So, CloseThread may be needed on M
On 12 Nov 2011, at 22:18, ik wrote:
> Since 2.6.0, when you write something like this:
>
> procedure foo(AClass : TStrings);
> foo(MyStringList); // Will return an error that TStrings is expected ...
Are you certain there is no "var" or "out" in front of that parameter?
> I can not use TString
Works for me:
program a;
{$mode objfpc}{$H+}
uses
Classes;
procedure foo(AClass: TStrings);
begin
end;
var
sl: TStringList;
begin
foo(sl);
end.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org
On 12/11/2011, ik wrote:
>
> Since 2.6.0, when you write something like this:
I think it was even before this.
> procedure foo(AClass : TStrings);
> foo(MyStringList); // Will return an error that TStrings is expected ...
>
> I can not use TStringList as the parameter without casting it to TStri
On 13/11/2011, leledumbo wrote:
> I think the
> compiler treats functions receiving array of char (or pointer to it) as
> ShortString when none of the directives above exist.
Indeed, FPC defaults to ShortString if {$H+} is not specified. That is
probably the problem. I really don't know why this
On 12/11/2011, Florian Klämpfl wrote:
> Am 12.11.2011 21:51, schrieb Rainer Stratmann:
>> Does more cpu cores mean less compile time?
>
> No.
Doing a 'make' for the FPC project, multiple cores can be used (via
eg: -j 5 command line parameter on a quad core system). But I think
the multi-core is o
On 12.11.2011 22:18, ik wrote:
Since 2.6.0, when you write something like this:
procedure foo(AClass : TStrings);
foo(MyStringList); // Will return an error that TStrings is expected ...
I can not use TStringList as the parameter without casting it to TStrings.
But I do not understand why this
Am Sunday 13 November 2011 02:15:07 schrieb leledumbo:
> It works when {$LONGSTRINGS ON} or {$H+} directive exists. I think the
> compiler treats functions receiving array of char (or pointer to it) as
> ShortString when none of the directives above exist.
No it does not work then.
I put already t
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
15 matches
Mail list logo