:
procedure ClrDebug(const panels: array of integer);
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
ClrDebug(panels[i]) calls itself again and not
procedure ClrDebug(panel: integer)...
So stack overflow happens.
If you need it only for integers then declare it as:
procedure ClrDebug(const panels: array of integer)
--
cobines
___
fpc-pascal
2012/3/31 Jonas Maebe :
>
> On 31 Mar 2012, at 12:07, cobines wrote:
>
>> The following program compiles and correctly prints 'something'. Is it
>> something supported or a bug?
>
> It is supported. Even Turbo Pascal already supported passing a single element
WriteLn(s[0]);
end;
var
s: string = 'something';
begin
Proc(s);
end.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
OK. Thanks, Jonas. I'll save a link to this message this time.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
+Ord('a')));
end;
var
p1,p2,p3: PChar;
begin
Randomize;
p1 := PChar(GetNew);
p2 := PChar(GetNew);
p3 := PChar(GetNew);
WriteLn(string(p1));
WriteLn(string(p2));
WriteLn(string(p3));
end.
--
cobines
___
fpc-pascal
src/platform/upixmapmanager.pas
Once you have MIME name look here how to find the icon location in the
icon theme:
http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/uicontheme.pas
--
cobines
___
fpc-pascal maillist - fpc-pascal@
Take a look at the unit here:
http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/unix/uunixicontheme.pas
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
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
I'm sure it is because patch contains non CRLF linefeeds, as I had
such errors previously, not even using Git. It seems the "patch"
binary only supports Windows EOLs.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.free
ot;eter3
3: parameter'4
There is a good guide here which I used for similar purpose:
http://www.grymoire.com/Unix/Quote.html
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
ousands of directories.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
data twice and as you see array is quite big.
Is it not possible to write directly to 4(%ebx)?
FPC 2.7.1 i386-Linux
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
inking is successful.
Is this some limitation of STABS or a bug?
My platform is Windows XP SP3 i386. FPC 2.7.1 r18142.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
e as param :
Constructor Create(Const aOwner : TTreeNodeWithProperties); Overload;
then if you're passing TTreeNode objects to TTreeNodeWithProperties
constructor it will only call the base constructor.
--
cobines
___
fpc-pascal maillist - fpc-pa
at least for variable "i" (Integer). Int64 "max" is stored in
two registers so it is still handled the same way.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2011/5/13 Ben :
> On 12/05/2011 20:54, cobines wrote:
>>
>> I'm running it on Windows XP i386, compiled with FPC 2.5.1 17430.
>>
>
>
> I tried this on my system which runs 64-bit Linux with FPC 2.4.3 (64-bit).
>
> Using -O, -O2 or -O3 command line
t can be rectified in the optimizer, or is it one
of those things that you just have to be aware of?
I have only found that disabling optimizations {$OPTIMIZATION OFF} ...
{$OPTIMIZATION DEFAULT} helps, but you have to do it for the entire
function.
--
cobines
__
2011/4/12 Paul Ishenin :
> 12.04.2011 4:22, cobines wrote:
>>
>> Hello.
>>
>> Following program:
>>
>> program a;
>> {$mode delphi}
>> type
>> generic TGen = class end;
>> TSpc = specialize TGen;
>> begin
>> end.
>
Is this a conscious change? There is no mention of this on Wiki User
Changes 2.4.4 or User Changes Trunk pages.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
cket:clRed, ctPants:clBlue,
ctShirt:clGreen);
Is something like this possible?
I know I can assign it at runtime:
Colors[ctJacket] := clRed;
Colors[ctPants] := clBlue;
Colors[ctShirt] := clGreen;
But I'm looking for compile time method.
--
cobines
___
2011/3/4 Jonas Maebe :
>
> On 04 Mar 2011, at 10:24, cobines wrote:
>
>> Is it possible to merge rev. 16418 from trunk to FPC 2.4.4?
>
> No, see http://bugs.freepascal.org/view.php?id=18831
I see, OK.
--
cobines
___
fpc-pascal ma
Hello,
Is it possible to merge rev. 16418 from trunk to FPC 2.4.4?
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=16418
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/list
OK, I understand now. Thank you for explanation.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
n compare interface variables but first I have to
bring them to the same interface using "as", for example to IUnknown.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
lly, I'm trying to determine in CopyToInterface function if the
parameter points to the same object as Self.
--
cobines
project1.lpr
Description: Binary data
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/
2011/1/28 :
>
>
> On Fri, 28 Jan 2011, cobines wrote:
>
>> Hello,
>>
>> Can someone comment on this issue? It still exists in current FPC
>> trunk. It seems the patch posted there fixes the issue. Is the patch
>> not good?
>
> The patch is go
Hello,
Can someone comment on this issue? It still exists in current FPC
trunk. It seems the patch posted there fixes the issue. Is the patch
not good?
Why is "raise ... at" needed instead of just "raise" ?
--
cobines
___
fpc-pas
quot;. Use it like this:
uses
fgl;
type
TPIntegerList = specialize TFPGList;
var
l : TPIntegerList;
i : Integer;
p : ^Integer;
begin
l := TPIntegerList.Create;
i := 1 ; new(p) ; p^ := i; l.Add(p);
p := l[0] ; writeln(p^);
: Integer;
begin
l := TFPList.Create;
index := l.Add(p);
p := l[index];
end;
You can use it like an array too:
var
l: TFPList;
begin
l := TFPList.Create;
l.Count := 20;
// now you have l[0]..l[19] elements for read/write
end;
--
cobines
__
ly on an array. So access
is fast; insertion, deletion not.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
gt; changePtrDirect.
>
> Is this interpretation more or less correct?
> How are var parameters actually implemented?
>
Yes, var parameters are passed by reference (pointer). See here
Variable Parameters:
http://www.freepascal.org/docs-html/ref/refse59.html.
--
cobines
___
while traversing the list when you encounter that
pointer to next node is nil then you are at the end of the list.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2010/4/24 David Emerson :
> move (src.f_data, self.f_data, length(self.f_data) * sizeof(byte));
>
I think it should be:
SetLength(self.f_data, length(src.f_data));
move (src.f_data[0], self.f_data[0], length(self.f_data) * sizeof(byte));
--
c
b then you can get sources, say from
http://www.zlib.net/ and rebuild using MinGW into a library, then link
with this library.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
isting object and you can use assigned to check it,
Pest would be a dangling pointer and should not be accessed.
I attached sample code with interfaces for you.
--
cobines
project1.lpr
Description: Binary data
___
fpc-pascal maillist - fpc-pas
Shouldn't the import library for "XXX.dll" be named "libXXX.a"? I
remember that linking to ".lib" didn't work for me, but to ".a" did.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepasca
this decoration because on Win64 it is not applied (I don't know if
only by GCC or other compilers too) and thought maybe FPC would do
this for me. But I guess I can use {$IFDEF}'s and just put different
names on Win32 and Win64.
--
cobines
__
2010/3/5 Jonas Maebe :
>
> On 05 Mar 2010, at 06:36, cobines wrote:
>
>> Is there a way I can declare the external function to use "C" style
>> mangling?
>
> That's currently only possible if the function also uses the C calling
> convention.
Ah,
an declare the external function to use "C" style mangling?
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
odSelected in state then
begin
// My Code
end;
Maybe you meant to declare 'state' as a set.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
test output 's'
pclose(f);
end
else
error := fpgeterrno; // failed
end;
This puts stdout and stderr into one pipe however. There must be some
way to read from stdout and stderr separately, maybe using TProcess,
but I've never needed it so I don't know how.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2010/2/2 Lee Jenkins :
> Isn't it supposed to assume utf-8 if no encoding processing instruction is
> present in the XML doc? I thought I read that somewhere...
It is supposed to look at "encoding" value, then BOM and if both are
not present assu
not a bug,
since I never used Delphi.
Thanks for explanation.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
This works fine
CM.Callback := CM.ContextMenuSelect;
CM.Callback(CM);
// This causes crash
// Should this be allowed to assign?
CM.Callback := TContextMenu.ContextMenuSelect;
CM.Callback(CM);
CM.free;
end.
--
cobines
___
fpc-pascal maillist - f
did wrong ?
Maybe there was an exception raised in the constructor in which case
destructor is called automatically. And in destructor you may be
accessing fTypeData without it being initialized. Try adding:
if Assigned(fTypeData) and Assigned(fPropList)
in destructor.
--
cobines
_
afe to use with interfaces, ansistrings, dynamic
arrays? Should I stop using it this way?
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Can the Fill... functions be changed to have the first parameter "out"
instead of "var" ? Surely they don't use it as an input parameter.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepa
2009/11/8 Jonas Maebe :
> Your problem is that every FPC-compiled library contains its own copy of the
> RTL.
I hadn't thought of that... It all makes sense now of course.
Thanks.
--
cobines
___
fpc-pascal maillist - fpc-pascal@lists.fre
A followup from the previous mail. I have expanded the program to
query pthreads library directly for thread's stack info. Here are the
results (the lines containing "Pthr" string have values reported by
the pthreads library):
MainThreadId : 3076675264
< main thread, main program >
CurrentThr
library > shows the same
value as in < main thread, main program > and in < main thread,
library >.
I'd be grateful for any explanations, or any pointers if I'm doing
anything wrong.
--
cobines
checkthreadinfo.lpr
Description: Binary data
checkthreadinfoV2.lpr
De
51 matches
Mail list logo