On Thu, Mar 14, 2013 at 2:58 AM, Xiangrong Fang xrf...@gmail.com wrote:
... which was a feature I like in C++, although I have never write a program
more complex than cout Hello World in that magnificent language. :-)
You consider it magnificent because you have not written anything
complex
On Sun, Mar 10, 2013 at 2:38 PM, Graeme Geldenhuys
gra...@geldenhuys.co.uk wrote:
No. As far as I understand, sets are stored in 1 byte internally - as
binary values. 256 is the max number of elements (bit values) it can
hold in a byte.
This is one area where FPC could actually improve
On Sun, Mar 10, 2013 at 3:45 PM, Marco van de Voort mar...@stack.nl wrote:
Sets are up to 32-byte (256bits), enums can be up to 32-bit.
Ok, sorry. The limitation for sets is not one byte.
Still, FPC could add support for still more bytes. 64-bit CPUs are now
popular and the feature could easily
On Sun, Mar 10, 2013 at 4:19 PM, Florian Klämpfl flor...@freepascal.org wrote:
This issue is similar. This kind of artificial limitation
I always wonder how people know more than me about the compiler :)
could easily be fixed.
Go ahead.
:)
Ok, I sent my reply too quickly. I must study the
Yes, I know this warning can be ignored, and every active member of
this list knows it, too.
However new users don't know it. Everybody who tries FPC / Lazarus for
the first time will scratch their heads and use Google, trying to find
out where exactly they forgot to put this -T.
My workmate
On Mon, Mar 4, 2013 at 9:21 PM, José Mejuto joshy...@gmail.com wrote:
What's the expected output of this code ?
function TheA(): string;
begin
Result:=Result+'A';
end;
writeln(TheA());
I thought that when the result type is an automated one its value gets
initialized... Maybe I'm
On Mon, Mar 4, 2013 at 10:51 PM, Howard Page-Clark h...@talktalk.net wrote:
That report says the issue was assigned to Jonas and fixed in revision 20427
(ver 2.6.1).
I find the current release (2.6.2) initialises a string function result to
EmptyStr as you would hope.
Ok, that sounds good.
I
On Fri, Mar 1, 2013 at 11:52 AM, Sven Barth pascaldra...@googlemail.com wrote:
Indeed. Like was the case with the project FireMonkey is based on...
I have heard mixed comments about FireMonkey. I don't know what to
think about it myself.
I seriously considered using it about half a year ago for
On Fri, Mar 1, 2013 at 1:33 PM, Sven Barth pascaldra...@googlemail.com wrote:
As I'm not talking about FireMonkey's architecture, but Embarcadero's style
of business it would be off-topic on either list :)
Ok, it is about business and marketing decisions.
It is not interesting for me, I am more
On Sun, Feb 17, 2013 at 11:12 PM, Marco van de Voort mar...@stack.nl wrote:
Q: how am I supposed to initialize OpenGL when using units provided by FPC?
The unit does it at startup. That has as disadvantage that the filename
can't be changed (or at least that first try can't be avoided).
On Wed, Feb 6, 2013 at 10:40 AM, Jeppe Græsdal Johansen
jjoha...@student.aau.dk wrote:
function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal;
begin
result := BeToN(aValue);
end;
Thanks, it works!
There are so many functions in FPC libraries which I don't know
anything about.
I remember seeing discussion about fcl-stl saying that it would still
need improvement but nobody is actively working on it.
I just couldn't find the thread about it now. So, what is the current state?
Sorry I have not studied the lib myself yet (long ToDo list).
For example, if someone is
On Fri, Dec 28, 2012 at 6:47 AM, Patrick patr...@spellingbeewinnars.org wrote:
I am also finding the site confusing. If I click on AMD64/x86_64 on the
binary download page and then choose sourceforge, I end up being offered a
package that says fpc-2.6.0.i386-linux.tar.
I did find another
May I ask how were the hierarchy and dependency graps generated?
Is there a tool that can do it?
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On Sat, Dec 15, 2012 at 12:50 PM, luciano de souza luchya...@gmail.com wrote:
Yes, there is a very nice tool. Its name is Pasdoc. Take a look here:
http://sourceforge.net/projects/pasdoc/
For this project, the author has changed the source code of Pasdoc.
Originally, it's compatible only with
On Sun, Oct 28, 2012 at 5:09 PM, bsquared bwcod...@gmail.com wrote:
And as an aside, what is the state of tiOPF, I could not get it to
install in Lazarus 1.02.
tiOPF2 works with Lazarus but the visual data-components included in
tiOPF do not work.
It is not a big problem because you can
On Sun, Oct 28, 2012 at 6:42 PM, bsquared bwcod...@gmail.com wrote:
Having trouble getting V2 demos to work. Have to keep at it.
There is a different folder for Lazarus demos. The AddressBook demo is
the most comprehensive. I don't have it installed on this machine so
cannot check the paths.
On Mon, Aug 20, 2012 at 5:47 PM, Jürgen Hestermann
juergen.hesterm...@gmx.de wrote:
Well, it is a bad idea to wildly scan directory branches just in case at
all.
That's fooling so many people and there is no good reason for doing so.
Only paths specified by the user (i.e. in config) should
On Tue, Aug 21, 2012 at 1:28 AM, Martin laza...@mfriebe.de wrote:
Well I am not myself a user of the converter.
But even if files are organized like this, then there may be several
versions of the Mijn Lib (or one of the units that should be found
there, is also in another folder). Then the
On Tue, Aug 21, 2012 at 2:11 AM, Martin laza...@mfriebe.de wrote:
On 21/08/2012 00:09, Juha Manninen wrote:
The converter is clever enough to ask from user what to do with an
unknown unit name.
It can be commented out or the user can search and select its location.
However, scanning
On Wed, Apr 11, 2012 at 9:19 PM, Mark Morgan Lloyd
markmll.fpc-pas...@telemetry.co.uk wrote:
I know that there are algorithms which given a text fragment will find the
best fit from a number of candidates, based on how many substrings have
to be deleted or changed.
Is there anything like
Amazing,
there are so many choices. I did not find most of them with a simple Google
search.
I will look at them more closely next week.
Thanks!
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Hi
I have a new job.
Now I am looking for a proper XML parser for Delphi, for big XML files.
The default Delphi parser, using MS DOM, chokes badly. 4 GB memory is not
enough for it.
Question:
Does FCL-XML work with a new Unicode Delphi?
Another question:
What does the license say about using
I am lazy and want to find the easiest way to install FPC 2.6.x on
Mint Linux, which is compatible with Ubuntu.
Has anyone made a repository which can be used with apt-get?
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
2012/2/20, Ludo Brands ludo.bra...@free.fr:
Grab it from the debian sid repository.
How?
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2012/2/20, Ludo Brands ludo.bra...@free.fr:
Grab it from the debian sid repository.
How?
Juha
2012/2/20, Juha Manninen juha.mannine...@gmail.com:
2012/2/20, Ludo Brands ludo.bra...@free.fr:
Grab it from the debian sid repository.
How?
Juha
2012/2/20, Ludo Brands ludo.bra...@free.fr:
I retract my proposal :) If you haven't installed from a foreign
distribution repository before then there are too many risks for messing up
your complete installation. You asked for an easy way: this isn't easy when
never done something similar
2012/2/20 Henry Vermaak henry.verm...@gmail.com
On 20/02/12 14:03, Juha Manninen wrote:
It is funny how people still think the Debian based package system is
the best. It was so maybe 10 or 15 years ago but not any more.
These problems have nothing to do with Debian packages. You need
2012/2/20 Mattias Gaertner nc-gaert...@netcologne.de
Linux Mint:
That's what I did:
sudo apt-get install lazarus subversion build-essential
Now you have some old Lazarus, FPC and all needed libs.
Download the fpc+lazarus svn or zip and build the latest and greatest.
Can you build FPC
2012/2/15, Jorge Aldo G. de F. Junior jagf...@gmail.com:
i once read a textbook about generics (C++ generics) showing how C++
C++ does not have generics, it has templates. Templates syntax is
complex, you can do actual programming with it. IMO, using all its
capacity leads to over-engineered and
2012/2/14, Sven Barth pascaldra...@googlemail.com:
Am 14.02.2012 06:45, schrieb Carver413:
doesn't generics more or less duplicate the class every time you use it
with
different type, and if so would this not cause alot of bloating ?
Yes it does. So for embedded systems use with care ;)
Oh,
2012/2/11, Jorge Aldo G. de F. Junior jagf...@gmail.com:
I believe generics makes faster code due to having no need to test
types during runtime... i maybe wrong.
It is true only if you use the type-safe as casting. Normal casting
does not check types at runtime.
It does make the code more
2011/12/19 Marco van de Voort mar...@stack.nl
FreeBSD and Linux x86 and x86_64 have internal assembler, but not linker.
Though the FreeBSD/x86_64 internal assembler is only enable in trunk afaik.
Be careful with binutils on ARM though, there are multiple ABIs, and the
installed ones must
2011/11/28 Henry Vermaak henry.verm...@gmail.com
There is an arm release for 2.6.0rc1, but it was built using old binutils
(last time I checked, at least):
ftp://freepascal.stack.nl/pub/**fpc/beta/2.6.0-rc1/arm-linux/ftp://freepascal.stack.nl/pub/fpc/beta/2.6.0-rc1/arm-linux/
I finally got
I used generics in Lazarus code base for the first time, in TreeFilter
component:
TTreeNodeList = specialize TFPGListTTreeNode;
and
TBranchList = specialize TFPGObjectListTBranch;
I works for me on Windows and Linux, with FPC 2.4.4 and 2.6.0 RC1.
Now Zeljan reported it does not compile on
2011/12/17 Juha Manninen juha.mannine...@gmail.com
I used generics in Lazarus code base for the first time, in TreeFilter
component:
TTreeNodeList = specialize TFPGListTTreeNode;
and
TBranchList = specialize TFPGObjectListTBranch;
I works for me on Windows and Linux, with FPC 2.4.4
2011/12/17 Jonas Maebe jonas.ma...@elis.ugent.be
On 17 Dec 2011, at 18:22, Juha Manninen wrote:
Fatal: Syntax error, expected but CLASS found
Works on 64-bit Linux.
How can OSX affect generics syntax?
There are no Mac OS X-specific failures of generics tests in the testsuite
(64
2011/11/29 Thomas Schatzl tom_at_w...@gmx.at
There is an arm release for 2.6.0rc1, but it was built using old
binutils (last time I checked, at least):
ftp://freepascal.stack.nl/pub/**fpc/beta/2.6.0-rc1/arm-linux/ftp://freepascal.stack.nl/pub/fpc/beta/2.6.0-rc1/arm-linux/
What OS/version
Hi
Is FPC 2.2.2 really the latest native release for ARM processors?
I guess it can build the more recent versions. (?)
In school we have an interesting project Developing Open Source Systems
where the idea is to make an internet router out of small DreamPlug
computer by Globalscale
2011/11/28 Juha Manninen juha.mannine...@gmail.com
1.2 GHz CPU and half a GB memory ...
The gadget also has two Gigabit Ethernet interfaces (!) which makes it
suitable for a router project.
Juha
___
fpc-pascal maillist - fpc-pascal
I try to learn to use generics properly.
First, this is a class definition without generics:
TMyDerived = class(TObjectList)
private
MyInt: integer;
public
constructor Create(FreeObjects: Boolean=True);
end;
It works. Now I try to derive a class with generics:
TMyGen =
... Sorry, forgot subject first
I try to learn to use generics properly.
First, this is a class definition without generics:
TMyDerived = class(TObjectList)
private
MyInt: integer;
public
constructor Create(FreeObjects: Boolean=True);
end;
It works. Now I try to derive a
Now, if I do:
myV := TMyDerived.Create(False);
if myV is TFPGObjectList then
...
it gives:
unit1.pas(67,10) Error: Class or Object types TMyDerived and
TFPGObjectList are not related
In my opinion they are related.
Maybe generics are good only for situations where you don't need to
2011/11/24 Sven Barth pascaldra...@googlemail.com
Thanks for the explanations.
In mode Delphi and my generic branch (I hope ^^) you are able to do it like
this as well:
myV := TMyDerived.Create(False);
if myV is TFPGObjectListTMyGen then
...
Under the condition that TMyDerived is
Regarding this issue:
http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=20713
The following does not compile any more with FPC 2.6.0-0.rc1.
---
generic TGen_T = class
type public
T_TArray = array of _T;
var private
w: T_TArray;
public
constructor
I tested FPC 2.6.0 on Linux and FPC 2.4.4 on Windows but it shouldn't
matter in this case.
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
2011/11/24 Jonas Maebe jonas.ma...@elis.ugent.be
The syntax is now:
type
generic TGen_T = class
public type
T_TArray = array of _T;
private var
w: T_TArray;
public
constructor Create(Value: _T);
end;
TSpecial = specialize TGeninteger;
I.e., type, var etc
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
2011/10/22 Gregory M. Turner g...@malth.us
Taking these terms in the broadest sense possible, wouldn't we say that OOP
is mostly a functional development paradigm?
Not a rhetorical question, I seriously am not sure.
OP's somewhat idiosyncratic requirement to put all the OOP metadata in a
2011/10/21 Jürgen Hestermann juergen.hesterm...@gmx.de
Florian Klämpfl schrieb:
If anybody does not see why increasing complexity without a good reason
should be avoided, I recommend:
I agree wholeheartly. In the past Pascal was a simple still powerfull
language but meanwhile it has
this pattern--parameterizing of algorithms and data structures using
code--far
easier.
Regards,
Juha Manninen
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hi
While reading a bug report I made the following experiment with Delphi 2009
and then with Lazarus + FPC 2.4.4.
TMainMenu.Items is of type TMenuItem. TMenuItem has only one version of
Add method and it takes another TMenuItem as parameter (checked from VCL
source).
Still, to my surprise, the
2011/8/13 Jonas Maebe jonas.ma...@elis.ugent.be
It is always best to isolate such things in a self-contained example that
does not depend on external code. Does this compile with your Delphi
version?
Yes, I should have done that. The code you gave does not compile.
If not, the issue is
2011/8/13 Ludo Brands ludo.bra...@free.fr
Delphi has a procedure TMenuItem.Add(const AItems: array of TMenuItem);
overload; which isn't implemented in Lazarus. It existed already in
Delphi6. So, not a compiler issue.
Ludo, you are right. Somehow I missed it. Uhhh...
Ctrl-Click leads to the
2011/6/16 Rainer Stratmann rainerstratm...@t-online.de
Am Thursday 16 June 2011 00:34:15 schrieb Juha Manninen:
Linux is still a superior platform for open-source software.
Unfortunately
for commercial software it is not.
That's not true. Look at http://www.cadsoft.de
Interesting. I
Thanks, there are many ways to install.
I used the Bart's system which is easy although it bypasses the package
manager.
I believe the Linux installation could be improved with build-servers like
Suse has and other distros, too.
There is no fundamental problem with it.
Linux is still a superior
I found the packages for Debian / Ubuntu / Mint :
ftp://ftp.hu.freepascal.org/pub/fpc/dist/2.4.4/i386-linux/deb/
How to install it?
Am I really supposed to download those ~40 packages separately and then
install them in some specific order?
Other people have brougt this up, too, and I understand
Marcos Douglas kirjoitti keskiviikko 16 maaliskuu 2011 13:18:41:
On Wed, Mar 16, 2011 at 12:56 AM, Robert Wolfe wolfe.robwo...@gmail.com
wrote:
WriteLn ;
{$IFDEF WIN32}
WriteLn ('This is a 32-bit version of Windows.') ;
{$ENDIF$}
{$IFDEF WIN64}
WriteLn ('This is a
. The
Superficies v.1 seems to have much more of them, so the code has become more
portable.
What are the 64-bit problems you faced?
Regards,
Juha Manninen
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman
Angel Montesinos kirjoitti torstai 24 helmikuu 2011 20:54:48:
This is a call for people willing to relieve me in the task of
maintaining a library for parsing, evaluating and differentiating real
functions with almost optimal speed and precision without recourse to
using multiprecision real
Sven Barth kirjoitti sunnuntai 06 helmikuu 2011 16:24:49:
FPreInitialisedSList.Text := StringsToUse;
Note: You can also define StringsToUse as a typeless constant, e.g.:
const StringsToUse = 'Line 1' + LineEnding +
'Line 2' + LineEnding +
// +
Mark Morgan Lloyd kirjoitti sunnuntai 06 helmikuu 2011 17:50:05:
Is it possible to set up the text as an attribute (I'm avoiding the word
property here for obvious reasons) of the entire class rather than of an
instance?
The const array could be outside of any class.
It is global if declared
ik kirjoitti perjantai 04 helmikuu 2011 16:36:20:
I've recently started to have the subject's error message on every attempt
to use the svn for update or to access the svn using a web browser.
Is there a known issue with the server, or should I be looking for
something on my
Michael Van Canneyt kirjoitti sunnuntai 23 tammikuu 2011 17:41:13:
On Sun, 23 Jan 2011, leledumbo wrote:
WARNING: it won't be simple
I'm using visitor pattern in my project and to the best of my knowledge,
the visitor should be implemented as an interface.
Why ?
tiOPF uses the
There are now 2 projects working on the same HTML component, one is HtmlPort
by Phil Hess, one is HtmlViewer maintained in Google Code.
I am trying to figure out the right way to modernize the code.
There is an idea to support all string types in old Delphis and new Delphis
and 3rd party Delphi
michael.vancann...@wisa.be kirjoitti tiistai 04 tammikuu 2011 12:42:44:
On Tue, 4 Jan 2011, Juha Manninen wrote:
This component would really benefit from the Delphi2009 default string
type. All string encoding problems would be solved automatically.
That is simply not correct.
I am
michael.vancann...@wisa.be kirjoitti tiistai 04 tammikuu 2011 15:08:01:
Not so here. Off the top of my mind:
- Explicit encodings run awry
- Some Components that used explicit Windows DoSomeThingA calls no longer
functioned. (TProcess for instance suffers)
- Database fields change type.
-
Marco van de Voort kirjoitti tiistai 04 tammikuu 2011 17:57:43:
No, my whole idea is to modernize the code and NOT support old versions.
And what if it doesn't work? That is the whole problem. You can't as with
other versions first migrate the code to roughly work on the new delphi
(fix
Jonas Maebe kirjoitti tiistai 28 joulukuu 2010 12:31:08:
Delphi's UnicodeString supports holding strings with arbitrary encodings
(not just UTF-16), along with transparent re-coding of strings when
assigning them to unicodestrings whose codepage has been statically
defined at compile time.
Marco van de Voort kirjoitti perjantai 31 joulukuu 2010 13:04:27:
In our previous episode, Jonas Maebe said:
Delphi's UnicodeString supports holding strings with arbitrary encodings
(not just UTF-16), along with transparent re-coding of strings when
assigning them to unicodestrings whose
support
for converting between 70 different encodings.
Juha Manninen
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Matthias Klumpp kirjoitti maanantai 13 joulukuu 2010 18:50:46:
if obj^ = nil then exit;
FreeAndNil(obj^);
Shouldn't it be:
// if obj = nil then exit; -- not really needed
FreeAndNil(obj);
Juha
___
fpc-pascal maillist -
On Tuesday 19 October 2010 19:10:39 Luiz Americo Pereira Camara wrote:
Yes it's ready in fpc 240:
uses
Fgl;
type
TIntegerList = specialize TFPGList Integer;
Well, yes. It is almost as good as a dedicated class. It has a Sort method but
you must feed the compare function for it.
It
Hi
In Lazarus project jcf2 component has an IntList class which is poorly
implemented. It depends on integer and pointer being the same size.
I will later suggest to replace it.
I have a better IntList. See:
http://github.com/JuhaManninen/Pascal/blob/master/IntList/intlist.pas
It is similar
Hi
I have a program that creates a TInterfacedObject and nothing else.
program project1;
{$mode objfpc}{$H+}
uses
Classes;
var
io: TInterfacedObject;
begin
io := TInterfacedObject.Create;
end.
I compile it with -gh (heap trace) and get the following output:
[DBGTGT] Heap dump by
On Sunday 17 October 2010 15:01:37 Paul Ishenin wrote:
Try the same but replace io type to IUnknown.
Thanks Marco and Paul. I should have known this one.
Regards,
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
On Saturday 02 October 2010 17:47:27 José Mejuto wrote:
The assembly window in Lazarus is shown when no backtrace line is
available to point the cursor in, so open callstack View - Debug -
Callstack and you will see that there is no available backtrace,
maybe except the fpc sources without
On Sunday 03 October 2010 19:48:22 C Western wrote:
Please report the bug. Yes the result is integer and in 64 bits, this
looks like a problem.
I think this is an issue I reported back in March, though I can now see
I uploaded the wrong patch for it
Sorry - meant to add:
On Sunday 03 October 2010 23:20:05 Juha Manninen (gmail) wrote:
Anyway this is a good example of a valid Lazarus patch that is ignored,
again. :-(
Ok, sorry Lazarus guys, I must take this one back.
The valid patch was uploaded only today so it was not really ignored.
Now there are 2 valid
Hi
I asked this on Lazarus list but it belongs better here.
So, how to get to the source line that gives a range check error?
I built the whole Lazarus with -Cr and debug it. When the range error happens,
it only shows a RunError or similar and doesn't show me the faulty source
line.
When
On Saturday 02 October 2010 12:21:20 Jonas Maebe wrote:
Compile with -gl, or set a breakpoint on FPC_RANGEERROR
Forgot to tell, I compiled with -gw -gh.
-gw should be as good as -gl.
Now I tried with -gl but no luck. I get an Assembly window:
On Saturday 02 October 2010 16:22:02 Honza wrote:
I just tried and can confirm that a LCL app running inside Lazarus
(r27491), having turned on range checks is able to perfectly catch and
show the place of an range check error (Ubuntu 10.04/AMD64). What I've
not tried, but suggest to try, is
On Saturday 02 October 2010 16:45:51 Jonas Maebe wrote:
Forgot to tell, I compiled with -gw -gh.
-gw should be as good as -gl.
It has nothing to do with being as good as, they do different things
(just like -gw and -gh do different things).
I have used only -gw and debugging works fine.
On Friday 01 October 2010 19:33:48 Mark Daems wrote:
...
And it's a weird behaviour, because it's all within an {$IFDEF FPC}
construct. Why does delphi even try to interprete it?
Somebody knows how to avoid the problem?
Try this instead:
{$IFNDEF FPC}
// Can be empty
{$ELSE}
...
Hi
Maybe someone here knows...
I built Lazarus with -gh, started it and closed without doing anything
else.
---
Heap dump by heaptrc unit
717866 memory blocks allocated : 81646458/83984784
717866 memory blocks freed : 81646458/83984784
0 unfreed memory blocks : 0
True heap size : 851968
A new Lazarus review :
http://delphimax.wordpress.com/2010/09/13/freepascal-and-lazarus-success-or-
failure/
has this comment about Lazarus source:
---
Abundant use of the Exit() command instead of nesting code in If/then/else. It
has been proven (last time in Delphi Informant Magazine) that
On Thursday 02 September 2010 00:47:23 José Mejuto wrote:
You must know at which node a new node must be inserted...
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
Hi
Is there an implementation of a hash map where the keys are integers. It is
needed when the integers are too big for a lookup array.
I only need check the existence of keys so the data type is not important.
About like this:
var
Len: integer;
SeenLen: TIntMap; // or whatever the type is
On Sunday 22 August 2010 18:45:04 Jeppe Johansen wrote:
I don't think the name map is misleading. It does exactly what a map
does. It maps a type Key to another type Value. A list maps an
integer(index) to a type Value The search is of course based on a list.
Hash tables, as far as I know, are
On Sunday 22 August 2010 18:51:21 Andreas Schneider wrote:
Afaik, inserting items into a sorted List is done via InsertSort, which is
the fastest way (O(n))to go (IMHO), so you do /not/ have to resort the
list.
True. I could optimize the current implementation a little. Now I insert and
then
On Sunday 22 August 2010 17:34:55 Andreas Schneider wrote:
uses fgl;
type
TIntMap = specialize TFPGMapInteger, Integer; //Maps Int -- Int
I compared the performance of this generics map to a simple integer list.
The map was much slower and it also ate huge amouts of memory, 1.5 GB.
On Saturday 14 August 2010 20:04:33 Marcos Douglas wrote:
3- Do exists something I can do with Delphi but not do with FPC?
Especialy on Windows.
...
7- Is there any other factors we should consider before making this
migration, which was not written above?
1. Are you targeting for
I also chose SynEdit for Lazarus Delphi converter for some reason. (I think it
was the first hit when searching regexp from Lazarus code base).
It works well.
I would guess the other choices work well, too.
About the speed difference: I don't believe there is any huge difference.
Please remember
Hi
Speed is important to me, but reg-expr features is important as well.
Actually, I want to include reg-expr as an alternative search mode in
my general-purpose file search unit.
Then the SynEdit's version of regexp should be fast enough.
SynEdit editor in Lazarus for example uses it and
Hi!
Well, we once had a prof who counted from 0. After he had drewn a large
diagram on the board he wanted to make sure that it was indeed 12 states
as stated in the caption. So he went: 0, 1, 2, ... , 11. Hmmm... I've
seem to have missed one. Let's count again: 0, 1, 2 , 11
He really
I'm curious, why didn't you make it a class...wouldn't that have made it
nicer/easier to use and program?
+1
It should be a class, yes. Now you have loads of global functions.
The integer data type doesn't make much sense but your comment says it will be
changed to generics type. That sounds
Hi,
There are use cases for this.
A while ago I thinking about a string-hash table as a cache for strings.
I have done that. Then I needed to inspect the reference count for debugging
and configuration purposes. I didn't know there is StringRefCount() function
so I also counted the string
This is plainly wrong. When indexing a dyn. array, the compiler
generates the correct code to access the data, no more no less.
It would be possible to allow this syntax :
move(data ...
in addition to the current :
move(data[0] ...
There is no fundamental reason why it wouldn't be
Hi
The essential part is to have virtual constructor like in Florian Klaempfl's
example code:
t_mammal = class
public
constructor create (color : byte); virtual;
end;
and then...
t_pig = class(t_mammal)
public
constructor create (color : byte); override;
end;
.
Or was it only with function's string return value, I am not sure.
Anyway, after that I was careful to always assign my strings.
Maybe it is not true with FPC.
Juha Manninen
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org
101 - 200 of 230 matches
Mail list logo