Thanks Felipe.
- Original Message
From: Felipe Monteiro de Carvalho
To: FPC-Pascal users discussions
Sent: Thu, December 23, 2010 5:00:04 AM
Subject: Re: [fpc-pascal] A cross-architecture Integer type for 32-bit and
64-bit
PtrUInt or something similar.
--
Felipe Monteiro de Carval
Is there a data typein FPC which is compiled as Cardinal in 32-bit, but
compiled
as UInt64 in 64-bit?
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Thanks Florian. :-)
- Original Message
From: Florian Klämpfl
To: FPC-Pascal users discussions
Sent: Tue, September 7, 2010 2:01:31 AM
Subject: Re: [fpc-pascal] stdcall on win64?
Am 06.09.2010 18:27, schrieb Bihar Anwar:
> stdcall calling convention is for Win32, right?
stdcall calling convention is for Win32, right? E.g.
function Test: HRESULT; {$IFDEF WIN32}stdcall;{$ENDIF}
By using $IFDEF like that, will the code also work in Win64?
Thanks in advance.
___
fpc-pascal maillist - fpc-pascal@lists.freep
O Marco, I love you :-)
- Original Message
From: Marco van de Voort
To: FPC-Pascal users discussions
Sent: Fri, September 3, 2010 11:02:52 PM
Subject: Re: [fpc-pascal] Recursion optimization by compiler
> Second, does FPC understand "tail recursion"?
Depends on version, do
fpc -i
September 3, 2010 7:17:57 PM, José Mejuto wrote:
> That kind of "optimization" to me only seems interesting in
> two possible situations, when calling functions is high
> costly or when there is a very limited stack amount (really,
> really small). From my point of view if you need more that
> 1M
After my previous post, "TreeView and Nonrecursion", I'd tried to ask the same
topics in stackoverflow.com
(http://stackoverflow.com/questions/3630047/treeview-control-and-nonrecursion)
and I got something new.
It is possible to recurse without using up the stack space. Optimizing
compilers
On September 2, 2010 5:14:50 PM, Juha Manninen wrote:
> If your input data contains a string which always
> identifies the parent node then you can map the
> string -> "parent node" and find it later for adding
> a child node.
>
> Pseudo code again:
> ...
> ...
> If you don't have such ID then
On 2 September 2010 3:53:34 AM, Vannus wrote:
> i probably shouldn't open my mouth, as i don't quite understand the
>question...
>
> however FRED from the game Freespace let you design missions using a
treeview.
Just to make my question clear, for example, I can fill a TreeView control with
A Newbie question :-) Is it possible to fill TreeView (tree is naturally
recursive) with a nonrecursive/iterative thinking paradigm? Are there some good
examples regarding this matter in the Internet?
I post this question in FPC mailing list because my question actually about
filling a "tree" i
Michael, what do you think about the following popular nested
try-except-finally construct?
try
try
...
except
...
end;
finally
...
end;
My understanding of your last statement is the above construct is superfluous.
Did it what you mean? If yes, is it only true in objfpc mode?
Thanks Graeme, please keep inform us about anything special to FPC/Lazarus
users. :-)
- Original Message
From: Graeme Geldenhuys
To: Other FPC related discussions. ; Lazarus
mailing list ; FPC-Pascal users
discussions
Sent: Tue, June 29, 2010 2:42:46 PM
Subject: [fpc-pascal] [ANN]
On June 10, 2010 6:12:42 PM, Tomas Hajny wrote:
>OK, this is a slightly different story then. Win32 API function FindFirst
>(and thus also the Delphi function FindFirst provided in SysUtils) returns
>the "search handle" (positive value) in case of a success and -1 in case
>of an error. The implem
June
10, 2010 3:03:45 PM, Jonas Maebe wrote:
>"MacOS" in the RTL stands for "System 7.5 - Mac OS 9.2.x", i.e., the "classic
>Mac OS" which
preceded Mac OS X. I don't think the sysutils unit was ever completely ported
for that
platform.
Thanks Jonas, your clarification strengthens my thought
On June
10, 2010 1:46:39 PM, Tomas Hajny wrote:
>If I remember correctly, it's been done in order to differentiate standard
>error
codes (supposedly cross-platform and mostly inherited from TP/BP)
>from all other error codes which may be
triggered there and which are
>completely platform specif
On June
10, 2010 1:00:27 PM, Tomas Hajny wrote:
>... or whether it should return the last OS error for what OS function
invoked recently (also directly without using RTL).
Yes, I think this one is agreed with other similar RTL functions.
__
I don't see SysUtils.GetLastOSError() in DOS. Looking at a glance, I think it
will be a trivial effort by just returning Dos.DosError variable content.
Also, I notice that SysUtils.GetLastOSError() in MacOS is defined but it's
implementation is empty. I've no knowledge on MacOS, so my question i
I look at the FPC RTL source codes and notice that in some OSes (e.g. OS/2,
DOS) every RTL functions which call OS API functions will return the OS error
code as a negative number. What is the reason behind this? I don't find such a
convention in the official documentation of thouse OSes.
OK guys, after contemplating all your suggestions, I decide to follow the
SynEdit way, that is, synregexpr unit. I suppose this unit tends to get more
maintenance in the future.
Concerning the C++ PCRE library, it is the most full-featured reg-expr
implementation, but calling C++ functions from
On June 6, 2010 3:06:06 PM, Graeme Geldenhuys wrote:
> I have looked into this as well, about 2 months ago. From my initial
> research it seems the regex unit included with FCL is not as
> feature-complete as the one in SynEdit.
On June 6, 2010 3:54:53 PM, Juha Manninen wrote:
>I also chose SynEdi
Schindler Karl-Michael wrote on June 6, 2010 1:09:02 AM:
>The pcre library (written in C) has a good reputation. You can get
pascal headers from the Project JEDI Code Library (JCL).
Wow, that seems a more promising approach in the current time, I'll look on it.
Thanks so much.
BTW, which approa
I've search fpc mailing list about this matter, I found they were discussed a
long time ago (2006), and I still didn't have a conclusion about which one
should be used. I need an advice about which unit should be used in terms of
features, speed, etc.
Also, if someone here know a better approac
Tomas Hajny on May 17, 2010 5:43:07 PM wrote:
>However, I don't think that anyone tried it with anything older than
>MS-DOS 5.0 recently.
So, the safe assumption is fpc-compiled programs should run smoothly in
at least MS-DOS 5.0. Thanks for the info.
>If you really need to use an even older
Vinzent Höfler on May 16, 2010 3:48:25 AM wrote:
>> I've tried googling and searching FPC mailing list for information about
>> this one, but I found nothing.
>> I just found in http://www.delorie.com/djgpp/v2faq/faq3_1.html that
>> DJGPP requires MS-DOS version 3.1 or later.
>>
>> Would som
I've tried googling and searching FPC mailing list for information about this
one, but I found nothing.
I just found in http://www.delorie.com/djgpp/v2faq/faq3_1.html that DJGPP
requires MS-DOS version 3.1 or later.
Would someone here tell me exactly about lowest MS-DOS version supported by
leledumbo onMay 12, 2010 3:58:09 PM
> Any reason for that? or it is not implemented yet?
> For the first one, usually errors in FPCgenerate exception, you can handle
> that instead.
Yes, as you said "usually", it is not "always". For example, FindFirst() and
FindNext return OS dependent error
Jonas Maebe on May 12, 2010 2:32:18 PM
On 12 May 2010, at 05:53, Bihar Anwar wrote:
>> As the title says. :-)
> No, it doesn't.
Any reason for that? or it is not implemented yet?
___
fpc-pascal maillist - fpc-pascal@lists.
Something like this one:
https://libxpl.arsoft.homeip.net/browser/trunk/errormap/xplErrorMap.cpp?rev=70
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
I mean, for example, are there something like:
- fpcError_ERROR_PATH_NOT_FOUND = ESysENOENT in UNIX
fpcError_ERROR_PATH_NOT_FOUND = ERROR_PATH_NOT_FOUND in Windows
- fpcERROR_FILENAME_EXCED_RANGE = ESysENAMETOOLONG in UNIX
fpcERROR_FILENAME_EXCED_RANGE = ERROR_FILENAME_EXCED_RANGE
As the title says. :-)
I mean
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Thanks Jose, Werner, and Jonas for the fantastic discussion and explanation.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
If I remember this correctly, I've formerly ever read somewhere (in my Delphi
days) that array should be declared globally (not inside a function or
procedure) so that access to the array will be faster. Is this correct? If yes,
does this also true in FPC?
Thanks in advance.
_
From: Aleksa Todorovic on May 5, 2010 3:13:12 PM
>As of copying/moving array elements, why don't you use
simple for loop
for that?
Because of performance optimization. TStringlist.Delete() and
TStringlist.InsertItem() itself uses Move() instead of such loop.
_
From: Jonas Maebe, May 2, 2010 7:05:46 PM
>And the last one explicitly states "No assumptions should be made about the
>number of temporary variables or the time when they are finalized".
I see, thanks Jonas for noting that statements.
>I know, we've had bug reports about that in the past. "Su
On May 2, 2010 4:24:37 PM, Jonas Maebe wrote:
> The reference counting logic is considered to be an opaque implementation
> detail (whose implementation can change at any time). It is undocumented by
> design.
In fact, it was already documented in detail in FPC Language Reference Guide:
3.2.4
>>Jürgen Hestermann wrote:
>> Although I would have expected that special procedures exist to insert
>> and remove array elements so that there is no need to do such things
>> manually ...
>David Emerson wrote:
>These must be written on a case-by-case basis, for each type of array element.
>Perhap
Florian Klaempfl:
> FPC and Delphi handle code generation for ref. counted types slightly
> different, so there might be cases where the ref. counter differs. As
> long as
there is no memory leak when the vars are properly used, we
> don't
consider it as a bug.
I see, well, there should be exp
I found that the last element of a dynamic array starts with reference count =
2 in FPC, but in Delphi is 1. Is this an FPC bug, or FPC implements reference
counting differ from Delphi?
type
PAnsiRec = ^TAnsiRec;
TAnsiRec = packed Record
Ref,
Len : SizeInt;
First : Char;
end;
boyarintsev
To: FPC-Pascal users discussions
Sent: Fri, April 30, 2010 3:22:22 PM
Subject: Re: [fpc-pascal] Is there a StringRefCount() equivalence?
On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwar wrote:
> I hope FPC developers will include StringRefCount() to the RTL.
Why would you need that?
tha
Thanks Jonas for your advice.
- Original Message
From: Jonas Maebe
To: FPC-Pascal users discussions
Sent: Fri, April 30, 2010 2:37:23 PM
Subject: Re: [fpc-pascal] Is there a StringRefCount() equivalence?
On 30 Apr 2010, at 05:42, Bihar Anwar wrote:
> By the way, how do I c
10-04-29 at 10:30 -0700, Bihar Anwar wrote:
> Delphi has StringRefCount() function (I'm not aware since what version it was
> introduced). I just curious, is there a function equivalent to it in FPC?
> Currently, I just steal a portion of code from System unit:
>
> type
Delphi has StringRefCount() function (I'm not aware since what version it was
introduced). I just curious, is there a function equivalent to it in FPC?
Currently, I just steal a portion of code from System unit:
type
PAnsiRec = ^TAnsiRec;
TAnsiRec = packed record
Ref,
Len : SizeInt
Thank you very much Henry, David, and Vincent. I think, I must go back to the
basic of reference counting. Special thanks to David for the detail explanation.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.o
) );// instead of a := Copy(a, 3,
2);
SetLength(a, 2);
- Original Message
From: dmitry boyarintsev
To: FPC-Pascal users discussions
Sent: Wed, April 28, 2010 10:31:09 AM
Subject: Re: [fpc-pascal] Question about Deleting elements in Dynamic Array
On Wed, Apr 28, 2010 at 7:2
users discussions
Sent: Wed, April 28, 2010 4:12:26 AM
Subject: Re: [fpc-pascal] Question about Deleting elements in Dynamic Array
On 27 April 2010 18:34, Bihar Anwar wrote:
>
> Would Move() be faster, instead of Copy()?
I guess so, have you tried to benchmark? If you really need speed,
wh
- Original Message
From: Henry Vermaak
To: FPC-Pascal users discussions
Sent: Tue, April 27, 2010 10:19:45 PM
>I think the right way to do this is:
>a := copy(a, 3, length(a) - 3);
>Presumably copy optimizes this adequately.
Henry
___
Would
Just say, I have a dynamic array with size=5, and I want to delete elements
from the index 0 to 2. Is there a trick (the fastest way) to delete those
elements (0 to 2) without moving activities?
I've tried to make the dynamic array just pointing to 3rd element and set a new
length for it, but f
In Windows XP and upper, traversing directories starting from root directory
(e.g. D:\) using FindFirst() and FindNext() will fail (ERROR_ACCESS_DENIED)
when iteration encounters "System Volume Information" directory. I solved this
by ignoring this error code and keep looping. However, I don't k
Thank you very much Jose, that's a detail explanation. Forget my wrong
observation before.
- Original Message
From: José Mejuto
To: FPC-Pascal users discussions
Sent: Thu, April 15, 2010 10:11:03 PM
Subject: Re[2]: [fpc-pascal] Initializing a record-type variable to get rid of
the f
Thanks Bart, forget my silly comments before, you did it cleverly.
- Original Message
From: Bart
To: FPC-Pascal users discussions
Sent: Thu, April 15, 2010 10:02:33 PM
Subject: Re: [fpc-pascal] Initializing a record-type variable to get rid of
the false-positive compiler hint
> Fil
Thanks for your reply José, but what is the philosophy behind the solution? and
What are the reasons for $PUSH and $POP? Also, I tried to remove the $HINTS
directive, and it worked fine without it. Could you explain this?
- Original Message
From: José Mejuto
Subject: Re: [fpc-pascal
I still need compiler hint generated by FPC at compiling (I don't want to turn
it off), but the hint sometime disturbs me because it's a false-postive
detection.
Supposing I have a record-type variable, could someone here tell me how to
initialize it properly so that FPC could notice the initia
Thanks very much Bart, Thomas, and Graeme, they're precious information. I even
didn't notice about the built-in feature within FPC and Lazarus IDE.
Thanks again.
- Original Message
From: Graeme Geldenhuys
To: FPC-Pascal users discussions
Sent: Mon, April 12, 2010 8:09:42 PM
Subject
Yes it works, but the {$DEFINE NOFORMSPLEASE} clause must be put in the unit
itself. If I put the clause in the first line of my console project, the unit
won't catch it.
How can I define a compiler directive that can be understood by all units in my
project?
Anyway, thanks.
- Original
Thanks Bart, I will try it.
- Original Message
From: Bart
To: FPC-Pascal users discussions
Sent: Sun, April 11, 2010 4:51:54 PM
Subject: Re: [fpc-pascal] (no subject)
Simply define the compiler directive NOFORMSPLEASE when compiling your
console app.
The ProcessMessages is there (I g
I have the following part of a unit code which can be compiled successfully
under a normal GUI application.
{$IFNDEF NOFORMSPLEASE}
if soProcessMessages in oSearchOptions then
Application.ProcessMessages;
{$ENDIF}
My question is, how can I use this unit from my console application? I k
56 matches
Mail list logo