Hi,
I ported to freepascal xxHash, very fast non-cryptographic algorithm,
working near the RAM limits. Originally, it is written in C and published
under the BSD license.
Original C: https://code.google.com/p/xxhash/
Pascal port: http://sourceforge.net/projects/xxhashfpc/files/
Currently
Hi,
once I came to troubles with "with":
procedure TForm1.StringGrid1SelectEditor(Sender: TObject; aCol, aRow: Integer;
var Editor: TWinControl);
begin
with StringGrid1 do
begin
...
Editor:= ...;
...
end;
end;
because Editor is also public property of TStringGrid
Hi,
this is working code:
...
if not assigned(XMLDoc) then XMLDoc:=TXMLDocument.Create;
with XMLDoc do
begin
if not assigned(DocumentElement) then
begin
aNode:=CreateElement(cRoot);
AppendChild(aNode);
end;
if ASchemeNode='' then AScheme
Hi,
I have question about initialization of variables used in nested methods.
This code gives warning: Variable "a" does not seem to be initialized.
procedure TForm1.Demo;
var a: Integer;
{ procedure ProcNested;
begin
a:=1;
end; }
begin
writeln('a: ', a);
end;
When I
Hi,
when I use {$B} I get " Warning: Illegal compiler directive "$B"' ". When I use
$BOOLEVAL everything is OK.
It does not correspond with docs:
http://www.freepascal.org/docs-html/3.0.0/prog/progsu4.html
Should I report?
V.
___
fpc-pascal mailli
ot;
Komu: "FPC-Pascal users discussions"
Datum: 13.12.2015 20:11
Předmět: Re: [fpc-pascal] $B and $BOOLEVAL
Am 13.12.2015 um 19:17 schrieb Vojtěch Čihák:
Hi,
when I use {$B} I get " Warning: Illegal compiler directive "$B&qu
Hello Fred,
just for curiosity, your mails (on fpc-pascal) sometimes appear "Fred van Stappen" and
sometimes "fredvs". Why? Do you have more accounts?
Blaazen
__
Od: fredvs
Komu:
Datum: 26.12.2015 10:55
Předmět: Re: [fpc-pascal] ide
Hi,
what is difference in produced assembler between ifthen(); and classic if -
then - else?
Thanks, V.
__
Od: Sven Barth
Komu: "FPC-Pascal users discussions"
Datum: 31.01.2016 15:43
Předmět: [fpc-pascal] New feature: IfThen() intr
It is guaranted for boolean operators with short-evaluation (if you mean this).
See: http://www.freepascal.org/docs-html/ref/refsu48.html#x150-17200012.8.3
V.
__
Od: Andreas Berger
Komu:
Datum: 02.02.2016 13:57
Předmět: Re: [fpc-pasc
Hi,
I personally think that there's no place for democracy in compiler development.
It would lead to bloat. Although majority of people considered it useful, it
was not very pascalish.
Trunk is place for experiments and this one is over.
V.
_
There exists IDE directive
{%MainUnit ***.pas}
and include files should contain it. But I don't know if there are more units
containing the same include file.
V.
__
Od: Anthony Walter
Komu: "FPC-Pascal users discussions"
Datum: 10.0
Hi,
64-bit Linux, Core2Duo@2GHz, FPC3.0.0:
Pascal: 440 ms
C: 163ms
Delphi )*: 515ms
)* Delphi7, personal edition, under wine, command: wine happyd7.exe
__
Od: Serguei TARASSOV
Komu:
Datum: 13.02.2016 11:44
Předmět: [fpc-pascal]
Thanks, but assembler links are wrong, all seem to point to test.c.
V. aka Blaazen
__
Od: leledumbo
Komu:
Datum: 13.02.2016 18:43
Předmět: Re: [fpc-pascal] Happy tickets benchmark
Here's a test from my machine (Manjaro Linux x86_
I can confirm, Inc(); is slower. Change decreased time from 440 to 390 ms.
Quick test (empty project in Laz.):
unit1.pas:35 inc(TicketsCount);
0046DB18 4883c001 add $0x1,%rax
unit1.pas:36 TicketsCount+=1;
00
Does FPC generate different code for Intel (like Core i7) and AMD (like Phenom
or so) when taget architecture is set to x86_64, i.e. are there any CPU
manufacturer specific optimizations ?
Thanks for reply,
V.
__
Od: Florian Klaemp
Assigning static class methods to procedure variables in ObjFPC would be very
nice feature.
V.
__
Od: Sven Barth
Komu: "FPC-Pascal users discussions"
Datum: 24.02.2016 17:22
Předmět: Re: [fpc-pascal] Compiler Mode?
* Unlogical appr
I tried your function in FPC 3.0.0 in mode ObjFPC and it returns False for
string 'E1/E2/etc'.
V.
__
Od: steveg
Komu: "FPC-Pascal users discussions"
Datum: 24.02.2016 00:57
Předmět: [fpc-pascal] Possible bug in Numeric test
Not su
Oh, I didn't catch it. So there must be some checking for E in the string - at
least on the first place - because strings 'E' and '1E' returns FALSE.
__
Od: Nitorami
Komu:
Datum: 24.02.2016 22:22
Předmět: Re: [fpc-pascal] Possible bu
IMO compilers should be dogmatic otherwise one cannot rely on them. This looks
to me like advocating wrong optimization.
Blaazen
__
Od: silvioprog
Komu: "FPC-Pascal users discussions"
Datum: 31.03.2016 15:33
Předmět: [fpc-pascal] Cl
ditionally
On Thu, Mar 31, 2016 at 10:58 AM, Vojtěch Čihák > wrote:
IMO compilers should be dogmatic otherwise one cannot rely on them. This looks
to me like advocating wrong optimization.
Blaazen
Thanks for reply Vojtěch, but are you referring to Delphi or FPC optimization?I think that F
How can I do it?
When I try do:
TMyObj = object(TObject)
compiler tells me:
Error: The mix of different kind of objects (class, object, interface, etc)
isn't allowed
Thanks
V.
__
Od: Tomas Hajny
Komu: "FPC-Pascal users disc
Hello,
I've got following declaration:
...
{$modeswitch typehelpers}
interface
uses
Classes, SysUtils;
type
TBuffer = array of Single;
{ TBufferHelper }
TBufferHelper = type helper for TBuffer
procedure Clear;
end;
...
var aBuffer: TBuffer;
...
And I can do:
aBuffer[3]:=5;
a
@ But the question is whether he want to set the array to empty or if he wants
to clear the array's contents without changing the size.
The second is right but it was not the point. "Clear" is just one example of
several methods I want to encalupsate into TBuffer.
I decided use the type helper
Hi, if you mean this:
function CategoryIndexOf(Name: String): Integer;
var
i: Integer;
begin
for i:= lstCategory.Items.Count-1 downto 0 do begin
if lstCategory.Items[i] = Name
then Break;
end;
Result := i;
if (i = lstCategory.Items.IndexOf(cActionListEditorUnk
I guess Graeme meant to make non-monospaced font look like monospaced in
Lazarus editor which currently doesn't work (it looks very ugly).
V.
__
Od: Jürgen Hestermann
Komu: FPC-Pascal users discussions
Datum: 21.11.2016 17:05
Předmě
To the topic:
Currently when I write the line (in Laz. editor):
const Num = 123456789;
I can hover the identifier "Num" and I see tooltip:
const Num = 123456789
/file/name.pas(x,y)
And there is no tooltip when I hover the "123456789".
Maybe this is place for improvement.
Hovering
Hi,
that's why portaudio.pp declares types like this:
PaStream = Pointer;
PPaStream = ^PaStream;
PPPaStream = ^PPaStream;
V.
__
Od: Sven Barth
Komu: fpc-pascal@lists.freepascal.org
Datum: 21.01.2017 12:29
Předmět: Re: [fpc-pascal]
Hi,
when you press CTRL+Q you will obtain two OnKeyDown events. The first with
Key=17 (it is CTRL) and the second with Key=81 (Q). Both events will have
ssCtrl in Shift.
V.
__
Od: Jürgen Hestermann
Komu: FPC-Pascal users discussions
Strange. I tested in Linux+Qt and in Delphi7 (under Wine) and both have ssCtrl
in Shift when I press Ctrl (i.e. Key=17).
V.
__
Od: Jürgen Hestermann
Komu: FPC-Pascal users discussions
Datum: 09.02.2017 11:52
Předmět: Re: [fpc-pascal
Hi,
there are different informations about *.wav, so maybe there are different
impementations too.
See:
http://soundfile.sapp.org/doc/WaveFormat/
and
https://blogs.msdn.microsoft.com/dawate/2009/06/23/intro-to-audio-programming-part-2-demystifying-the-wav-format/
The first says that 8-bit is
Hi,
"packed record" is for compatibility. Its guaranteed that inner alignment and size of
record will be always the same and will not change in future versions of compiler, unlike the plain
"record".
https://www.freepascal.org/docs-html/ref/refsu15.html
V.
_
Hi,
wiki https://en.wikipedia.org/wiki/Julian_day says that "... Julian day number 0
assigned to the day starting at noon on January 1, 4713 BC, ..."
The noon means 0,5.
V.
__
Od: Dennis
Komu: FPC-Pascal users discussions
Datum: 0
Hi,
wiki https://en.wikipedia.org/wiki/Julian_day says that "... Julian day number 0
assigned to the day starting at noon on January 1, 4713 BC, ..."
The noon means 0,5.
V.
__
Od: Dennis
Komu: FPC-Pascal users discussions
Datum: 0
Hi,
TBitBtn has property Kind, setting it to anything else than bkCustom will show
the glyph (native, from widgetset).
With TSpeedButton, you are always on your own.
V.
__
Od: pasc...@piments.com
Komu: fpc-pascal@lists.freepascal.
Overloading means that you have functions with the same name but different
parameter (or param. list). You can have different return type for each
parameter but you can never have the same parameters.
V.
__
Od: Darius Blaszyk
Komu: FP
Looking to docs: https://www.freepascal.org/docs-html/ref/refsu69.html
I tried writeln(AnsiString(args[0].VAnsiString));
or just writeln(String(args[0].VAnsiString));
which works.
V.
__
Od: Darius Blaszyk
Komu: FPC-Pascal users discu
Hi,
if I run the code it writes "Unhandled exception". I tried to add another
try..except block and it's OK.
program xml_leak_test;
{$mode objfpc}
uses
heaptrc,
Classes,
DOM,
XMLRead;
var
XMLDocument: TXMLDocument;
InvalidStream: TStringStream;
const
INVALID_XML_CONTENT = '<<>>
I can confirm. I sent one mail 21-st November to Laz. ML and the second today
at ~19:30 and they are not in my mailbox.
V.
__
Od: Giuliano Colla
Komu: fpc-pascal@lists.freepascal.org
Datum: 25.11.2017 13:35
Předmět: Re: [fpc-pascal]
It seems that overloading is possible but compiler does not want to accept
anonymous array of strings. It works with variable or with anonymous array of
integers (FPC 3.0.4).
V.
__
Od: Fabio Luis Girardi
Komu: FPC-Pascal users discu
Hi, it seems you are right:
https://en.wikipedia.org/wiki/Extended_precision#Working_range
V.
__
Od: Bart
Komu: FPC-Pascal users discussions
Datum: 14.12.2017 23:51
Předmět: [fpc-pascal] Math.MinExtended value
Hi,
I was playing a
Hi,
it seems there is something wrong with helpers or Lazarus is fooled from
directives.
When I find procedure TExtendedHelper.BuidUp() in syshelph.inc and hit
Ctrl+Shift+Up, it takes me to TFLOATHELPER.BuildUp() implementation in
syshelpf.inc.
And when I hit Alt+Up, it takes me back to dec
Hi,
Double Commander allows to create zip archives with password but I don't know
what lib they use.
V.
__
Od: "James Richters"
Komu: "'FPC-Pascal users discussions'"
Datum: 12.12.2017 17:32
Předmět: [fpc-pascal] Freepascal Zip wi
Hi,
is this bug?
{ TCompStreamPers }
TCompStreamPers = class(TCustomControl)
private
function GetItem(AIndex: Integer): TPersItem;
procedure SetItem(AIndex: Integer; AValue: TPersItem);
protected
FItems: TFPObjectList;
public
constructor Create(AOwner: TComponent); over
, Vojtěch Čihák wrote:
> Hi,
>
> is this bug?
>
> { TCompStreamPers }
> TCompStreamPers = class(TCustomControl)
> private
> function GetItem(AIndex: Integer): TPersItem;
> procedure SetItem(AIndex: Integer; AValue: TPersItem);
> protected
>
Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function
CompareName.
V.
__
Od: Darius Blaszyk
Komu: FPC-Pascal users discussions
Datum: 18.01.2018 00:11
Předmět: [fpc-pascal] Strange issue with TXMLConfig
All of a sud
The second TDOMNode from unit DOM (fcl-xml) has that function too, in FPC 3.0.4.
V.
__
Od: Vojtěch Čihák
Komu: FPC-Pascal users discussions
Datum: 18.01.2018 00:30
Předmět: Re: [fpc-pascal] Strange issue with TXMLConfig
Hi, I can
Hmm, I remember there are two ways how to work with XML: Laz2_xxx and fcl-xml.
My idea was that you got some wrong TDOMNode in the path.
V.
__
Od: Darius Blaszyk
Komu: FPC-Pascal users discussions
Datum: 18.01.2018 20:31
Předmět: Re:
Hello,
would it be possible to do more advanced checking of this note? This code
var i: Integer;
begin
i:=5;
end;
gives Note: Local variable "i" is assigned but never used
var i: Integer;
begin
i:=5;
writeln('i ', i);
end;
is OK
var i: Integer;
begin
i:=5;
writ
It does not seem to do anything in latest FPC and Lazarus.
V.
__
Od: Juha Manninen
Komu: FPC-Pascal users discussions
Datum: 20.02.2018 14:34
Předmět: Re: [fpc-pascal] Advanced note: local variable "i" is assigned but
Try with flag
Hi,
Bar shoud be released by Interface, no need to call Free.
V.
__
Od: "Marcos Douglas B. Santos"
Komu: FPC-Pascal users discussions
Datum: 11.03.2018 14:23
Předmět: [fpc-pascal] Using Supports() I got an AV... bug?
The code belo
scal users discussions
Datum: 11.03.2018 14:57
Předmět: Re: [fpc-pascal] Using Supports() I got an AV... bug?
On Sun, Mar 11, 2018 at 10:52 AM, Vojtěch Čihák wrote:
>
> Hi,
>
> Bar shoud be released by Interface, no need to call Free.
I'm sorry, but `Bar` was defined as `Bar: TB
With this modification and -gh it is alright:
[v1@nb-msi Interface]$ ./test
Bar supports...
Heap dump by heaptrc unit
7 memory blocks allocated : 875/880
7 memory blocks freed : 875/880
0 unfreed memory blocks : 0
True heap size : 360448
True free heap : 360448
[v1@nb-msi Interface]$
V.
__
fpc-pascal] Using Supports() I got an AV... bug?
On Sun, Mar 11, 2018 at 11:51 AM, Vojtěch Čihák wrote:
> With this modification and -gh it is alright:
>
Only if you declare `Bar` as `IBar` instead of `TBar`. Please, check
your code again.
Regards,
Marcos Douglas
__
Hi,
cheetahs have usually more rounded head and rounded ears. And whiskers should
be curved.
http://news.stlpublicradio.org/post/cheetah-populations-keep-falling-scientists-demand-better-protection#stream/0
Just my 50 cents.
V.
__
Hi,
Why not define?
{$DEFINE DEBUG}
{$IFDEF DEBUG} Writeln('diagnostic info'); {$ENDIF}
V.
__
Od: "James Richters"
Komu: "'FPC-Pascal users discussions'"
Datum: 18.04.2018 05:06
Předmět: [fpc-pascal] Using constants instead o
i,
LCLIntf, LCLProc, LCLType isn't enough? I will use dotted units only if there
will be absolutely no other way around.
I believe it can be useful but I don't think it's "must have" (when I don't
consider Delphi compat.).
V.
__
O
Hi,
Linux 64-bit Lazarus 1.9.0 r57948M FPC 3.1.1 x86_64-linux-qt gives
1.00E+00 1
V.__
Od: LacaK
Komu: FPC-Pascal users discussions
Datum: 17.05.2018 13:33
Předmět: [fpc-pascal] Currency and Int64 casting
Hi,
Hi,
I have
unit1.pas:36 i:=Int64(c);
0046EEE0 488b45e8 mov -0x18(%rbp),%rax
0046EEE4 488945e0 mov %rax,-0x20(%rbp)
unit1.pas:38 writeln(i);
at Level0 andunit1.pas:36
Hi,
this seems to be misleading error message. TFPGObjectList works well for
objects (classes). When I tried to push record to it, I got the same error
message. TVec3 is not class, right?
Vojtěch
__
Od: Ryan Joseph
Komu: FPC-Pasca
Hi,
I agree with the original topic that overload function Math.Max(Double, Double)
shoud be chosen instead of Math.Max(Single, Single) when one of parameters is
Integer.
But your criticism make no sense to me. You can as well point that this code:
var a, b: Byte;
begin
a:=5;
b:=a div
Hi,
Lazarus has option "Show Class/Proc Hint" which displays method name (with
light-green background) as the top line in source editor, only if the method's body is
longer than number of lines in source editor.
Maybe new option "Show Proc var block" for permanent displaying var block in
long
. And I guess programmers have usually bigger displays.
V.
__
Od: Michael Van Canneyt
Komu: FPC-Pascal users discussions
Datum: 17.07.2018 15:34
Předmět: Re: [fpc-pascal] Syntax changes suggestions
On Tue, 17 Jul 2018, Vojtěch Čihák
Hello,
you can define type:
TIntArray = array of Integer;
operator + (left: TMyClass; right: TIntArray): TMyClass; overload;
and with retyping it works:
c := c + TIntArray([1, 2, 3]);
V.
__
Od: Ben Grasset
Komu: FPC-Pasc
Hello,
I needed to extend TFPGObjectList and I found two wierd things (FPC 3.1.1
r39507):
program project1;
{$mode objfpc}{$H+}
uses
Classes, FGL;
type
TBaseClass = class (TObject)
end;
TIDClass = class (TBaseClass)
ID: Integer;
end;
TNameIDClass = class (TIDClass)
Thanks for reply.
Ad 2) I opened issue: https://bugs.freepascal.org/view.php?id=34037
Ad 1) Are there any plans for improvement of generic inheritance? Related to my
example, instead of
generic TFPGObjectListEx = class (specialize TFPGObjectList)
I would prefer simplier and more strai
And the gain will be lost after installing Spectre patches, where is measured
performance loss is 1~3%.
V.
__
Od: Martin
Komu: fpc-pascal@lists.freepascal.org
Datum: 06.08.2018 14:38
Předmět: Re: [fpc-pascal] Will moving from due cor
Hello,
even if there's closed issue https://bugs.freepascal.org/view.php?id=34169 I
would like to ask if it can be reconsidered.
The subject is that SetLength now gives warning: Variable "dynamic array" of a
managed type does not seem to be initialized
in 3.3.1 and 3.1.1 while it doesn't giv
Hello,
even if there's closed issue https://bugs.freepascal.org/view.php?id=34169 I
would like to ask if it can be reconsidered.
The subject is that SetLength now gives warning: Variable "dynamic array" of a
managed type does not seem to be initialized
in 3.3.1 and 3.1.1 while it doesn't giv
Very good.
V.
__
Od: "Sven Barth via fpc-pascal"
Komu: fpc-pascal@lists.freepascal.org
Datum: 11.11.2018 18:22
Předmět: Re: [fpc-pascal] Uniform initialization?
Am 11.11.2018 um 16:03 schrieb tobiasgie...@gmail.com:
> Hello,
>
> Del
IMO 100% Delphi compatibility was important some 10 years back when Kylix was
discontinued and peope wanted to port their old Delphi projects to Linux. From
that time boh FPC and Lazarus are mature enough and everyone who started a new
project after - let's say - 2008 had to do the decision: De
Hi,
why this code gives EInvalidCast at runtime (but compiles well):w
program Project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, fgl
{ you can add units after this };
{$R *.res}
type
TMyClass = class
procedure Output1;
I forgot: FreePascal 3.3.1 r.40507
V.
__
Od: "Vojtěch Čihák"
Komu: "FPC-Pascal users discussions"
Datum: 11.12.2018 22:19
Předmět: [fpc-pascal] Generic (TFPGObjectList) EInvalidCast
Hi,
why this code g
Sorry for noise, this was wrong code and even more it has nothing to do with
generics.
I can solve it with class helper.
V.
__
Od: "Vojtěch Čihák"
Komu: "FPC-Pascal users discussions"
Datum: 11.12.2018 22:19
1 Dec 2018 22:19:11 +0100
Vojtěch Čihák wrote:
because MyClass is not TMyDescClass
Mattias
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
<http://lists.freepascal.org/cg
Hi,
I found this article: https://drewdevault.com/2020/01/04/Slow.html
but FPC is missing, so I wrote simple:
program Project1;
begin
writeln('Hello world!');
end.
$ fpc -O3 -XX Project1.pas
$ strace -C ./Project1
% time seconds usecs/call calls errors syscall
-- -
There is TFPGObjectList for objects.
BTW, is FGL a good choice for generics? Some time ago Marco wrote here that FGL
is moreless a technology demonstrator and Generics.Collection or other
libraries should be used instead.
Thanks for reply
V.
__
I suspect Embarcadero that they often intently design Delphi to be not
compatible with FPC.
V.
__
Od: "Sven Barth via fpc-pascal"
Komu: fpc-pascal@lists.freepascal.org
Datum: 09.07.2020 07:30
Předmět: Re: [fpc-pascal] LongInt and LongW
Hi,
I used TFPObjectList only once, for visual component TECAccordion
(https://wiki.lazarus.freepascal.org/Eye-Candy_Controls#TECAccordion). Each
item of list is derived from TWinControl so it is possible to use it even for
visual components (like TCollection).
However, in your case (record
it comfortably
MyList[1].Port:='abc';
V.
______
Od: "Vojtěch Čihák via fpc-pascal"
Komu: ja...@productionautomation.net, "FPC-Pascal users discussions"
Datum: 08.09.2020 16:21
Předmět: Re: [fpc
I looked to code, it gives error only when map is Sorted=True.
function TFPSMap.Add(AKey: Pointer): Integer;
begin
if Sorted then
begin
if Find(AKey, Result) then
case Duplicates of
dupIgnore: exit;
dupError: Error(SDuplicateItem, 0)
end;
end else
Result
Hello,
look at this bugreport. I reported it as a Lazarus issue but now it looks like
FPC trunk issue.
https://bugs.freepascal.org/view.php?id=37856
Vojtech aka Blaazen
__
Od: "C Western via fpc-pascal"
Komu: fpc-pascal@lists.fre
Hi,
I tried this (add StrUtils to uses):
procedure TForm1.Button1Click(Sender: TObject);
var i, l: Integer;
aV: Double;
aF: TFormatSettings;
begin
aF.DecimalSeparator:='.';
aF.ThousandSeparator:=' ';
for i:=-2 to 10 do
begin
aV:=pi*power(10, i);
l:=length(intToStr
Hello and thanks.
I downloaded 3.2.2 (tar), I installed it successfully.
I used it to compile the latest 3.3.1 trunk, again successfully.
And I used this 3.3.1 to build the Lazarus 2.1.0 trunk (65138). Also
successfully.
Everything seems be OK.
Vojtěch a.k.a. Blaazen
Hi,
Laz2_ are UTF8 versions and they works well.
Create(nil); means that instance has no owner.
(I have Lazarus 2.3.0, it is not on line 165 here).
You can try demo at ../examples/xmlstreaming/.. It works here.
V.
__
Od: "Abuy
Hi,
my numbers of Lazarus on Linux, Qt (incl. binaries and *.ppu and *.o files)
SVN:
lazarus dir: 2.6 GB (4 files, 1300 dirs)
.svn subdir: 1.6 GB (25000 files, 260 dirs)
GIT:
lazarus dir: 1 GB (15000 files, 950 dirs)
.git subdir: 150 MB (60 files, 40 dirs)
V.
Hi,
I wrote a generic class to test sorting algorithms and also benchmarking them.
I have following problem:
When I change even a single line of code anywhere in that unit, even in an
unrelated method, all ~40 algorithms become a little slower or a little faster.
I observed it has two levels
oblem.
__
Od: "Vojtěch Čihák via fpc-pascal"
Komu: "FPC-Pascal users discussions"
Datum: 19.10.2022 15:37
Předmět: [fpc-pascal] Problem with code aligning (probably)
Hi,
...
Thanks for help.
__
solve it reversely:
-OaJUMP=1 to -OaJUMP=2.
Of course, I'd like some persistent solution.
V.
__
Od: "Vojtěch Čihák via fpc-pascal"
Komu: "FPC-Pascal users discussions"
Datum: 19.10.2022 17:39
Předmět: Re:
On 20/10/2022 00:24, Vojtěch Čihák via fpc-pascal wrote:
That's not easy, unfortunately: https://www.youtube.com/watch?v=r-TLSBdHe1A
<https://www.youtube.com/watch?v=r-TLSBdHe1A>
Jonas
___
fpc-pascal maillist - fpc-pa
Hi,
I noticed this too a few years ago when I translated xxHash from C to FPC.
Pushing the code to less lines improved speed so xxHash32 was as fast as in C.
do { v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4; v2 = XXH32_round(v2,
XXH_get32bits(input)); input += 4; v3 = XXH32_round(v
Sorry, it was copy-paste from github and it broke formatting
do {
v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4;
v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4;
v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4;
v4 = XXH32_round(v4, XXH_get32bits(inp
Hi,
I wrote a generic abstract class - a list based on dynamic array (i.e. array of
T;) and this class can be specialized elsewhere with any type (records or
classes).
Part of the class is sorting. There are more ways how to deliver *compare
function* to sorting method. I can pass it as a para
"FPC-Pascal users discussions"
Datum: 18.11.2022 20:45
Předmět: Re: [fpc-pascal] How to inline CompareFunc to Sort method in generic
abstract class
Em seg., 14 de nov. de 2022 15:26, Vojtěch Čihák via fpc-pascal > escreveu:,What do you mean by "be inlined"? The
Hi,
I have local type TTempItem, i.e. declared inside method of a generic class.
When I write:
type
TTempItem = record
Item: T;
Empty: Boolean;
end;
I got: Identifier not found "T".
When I write:
type
TTempItem = record
Item: TBaseGList.T; //name of the cla
T and generics
Am 31.12.2022 um 14:34 schrieb Vojtěch Čihák via fpc-pascal:
> Is this intended? Or known bug?
It's a bug. Please report with a full example.
Regards,
Sven
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://
Hi,
is there a way how to have dynamic array "inside" another dynamic array?
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Classes, SysUtils
{ you can add units after this };
{$R *.res}
type
TDynArray = array of Integer;
PTDynArray = ^TDynArray;
der Sluis via fpc-pascal"
Komu: fpc-pascal@lists.freepascal.org
Datum: 12.01.2023 00:22
Předmět: Re: [fpc-pascal] Dynamic array question
Vojtěch Čihák via fpc-pascal schreef op wo 11-01-2023 om 23:38 [+0100]:
> is there a way how to have dynamic array "inside" another dynamic
Hi,
you can use PChar, or string+retype to PChar in blockwrite:
BlockWrite(f1, PChar(s)^, length(s));
which gives expected result.
V.
__
Od: "Travis Siegel via fpc-pascal"
Komu: "FPC-Pascal users discussions"
Datum: 05.03.2023
Hi,
I'm almost fourteen years on the forum and a few years less on mailing lists
and I never had a single problem.
I don't attend IRC so I can't say what's wrong there.
OTOH I read Joanna's comments on the forum and they are OK (to the topic; non
conflict).
V.
_
99 matches
Mail list logo