[fpc-pascal] Dynamic array as return type of functions

2007-05-23 Thread Christos Chryssochoidis
Hi, I tried to write some function that returned a dynamic array, and realized that this isn't allowed. Why? After all one can specify an array of variable length as type for variables... Furthermore - if I'm not mistaken - a dynamic array is implemented internally as a pointer, and so

Re: [fpc-pascal] Dynamic array as return type of functions

2007-05-23 Thread Michalis Kamburelis
Christos Chryssochoidis wrote: Hi, I tried to write some function that returned a dynamic array, and realized that this isn't allowed. Why? After all one can specify an array of variable length as type for variables... Furthermore - if I'm not mistaken - a dynamic array is implemented

Re: [fpc-pascal] Dynamic array as return type of functions

2007-05-23 Thread Daniël Mantione
Op Wed, 23 May 2007, schreef Michalis Kamburelis: Christos Chryssochoidis wrote: Hi, I tried to write some function that returned a dynamic array, and realized that this isn't allowed. Why? After all one can specify an array of variable length as type for variables... Furthermore -

[fpc-pascal] gcc beats fpc again

2007-05-23 Thread Bisma Jayadi
http://shootout.alioth.debian.org/gp4/benchmark.php?test=alllang=allxfullcpu=1xmem=1xloc=0binarytrees=1chameneos=1message=1fannkuch=1fasta=1knucleotide=1mandelbrot=1meteor=0nbody=1nsieve=1nsievebits=1partialsums=1pidigits=1recursive=1regexdna=0revcomp=1spectralnorm=1hello=1sumcol=1calc=Calculate

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Jonas Maebe
On 23 mei 2007, at 10:16, Bisma Jayadi wrote: Obviously, some C programmers has done some more optimizations. :( So it obviously means that gcc does not beat fpc (and that fpc did not beat gcc before), but simply that the C programs beat the Pascal programs (and that it was the other way

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Daniël Mantione
Op Wed, 23 May 2007, schreef Bisma Jayadi:

Re: [fpc-pascal] Dynamic array as return type of functions

2007-05-23 Thread Christos Chryssochoidis
On 23 Μαϊ 2007, at 11:11 ΠΜ, Daniël Mantione wrote: Op Wed, 23 May 2007, schreef Michalis Kamburelis: Christos Chryssochoidis wrote: Hi, I tried to write some function that returned a dynamic array, and realized that this isn't allowed. Why? After all one can specify an array of variable

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Daniël Mantione
Op Wed, 23 May 2007, schreef Bisma Jayadi: No C programs have been submitted recently. It is probably the new broken scoring system. Is Shootout using new scoring system? How did you know that? See the long thread on the forum. It penalizes Pascal because we have a bad score for

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Jonas Maebe
On 23 mei 2007, at 10:39, Bisma Jayadi wrote: Of course it's very relevant since they are all using same algorithms No, because there are lot of ways to implement a single algorithm. Do you use ansistrings, shortstrings, arrays of char, or pchars? Do you use getmem or dynamic arrays? Do

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Daniël Mantione
Op Wed, 23 May 2007, schreef Jonas Maebe: On 23 mei 2007, at 10:39, Bisma Jayadi wrote: Of course it's very relevant since they are all using same algorithms No, because there are lot of ways to implement a single algorithm. Do you use ansistrings, shortstrings, arrays of char, or

Re[2]: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Пётр Косаревский
The one missing FPC program measures the speed and abilities of the regular expressions engine from language distribution. Tonow FPC one has not enough abilities, but the engine may be written even exclusively in assembler or C: what matters is whether it is present in the distribution and has

[fpc-pascal] SqlDB and Text BLOB fields

2007-05-23 Thread Graeme Geldenhuys
Hi, I'm using a Firebird database with a field define as 'Blob sub_type 1' to store text. What method am I supposed to use to set the parameter value? AValue: string; FIBSQL.Params.ParamByName(AName).AsString := AValue; or FIBSQL.Params.ParamByName(AName).AsMemo := AValue; What's

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Christian Ulrich
NO: C gcc has the first Place C is not Object oriented, FPC is Object oriented. And g++ is behind fpc. regards Christian Bisma Jayadi schrieb:

Re: [fpc-pascal] gcc beats fpc again

2007-05-23 Thread Daniël Mantione
Op Wed, 23 May 2007, schreef Christian Ulrich: Very few OOP is used in the Pascal implementations, so Pascal and C are on equal grounds here. musnt the memory manager included if only few oo stuff is included ? ? The heap manager is always in the exe; it cannot be smarlinked away.