FPC provides headers for Win API, GTK2, Cocoa, etc. so you can create
GUI applications with a default FPC installation.
W dniu 2024-11-20 o 15:45, Travis Siegel via fpc-pascal pisze:
Again, both of which are IDEs (just of a different type.
You still haven't shown me how to build a GUI app with
Currently, libxml2 headers are outdated and partially
incorrect/incomplete. I updated the headers a couple of years ago. You
can find the patch file here:
https://gitlab.com/freepascal.org/fpc/source/-/issues/38905
Michał.
W dniu 2023-06-12 o 17:12, David Connolly via fpc-pascal pisze:
Hi al
Why am I getting a different level (hint/warning) of the same compiler
message in similar code, only differing in return type?
The following example:
program Project1;
uses SysUtils;
function Test1: String;
begin
SetLength(Result, 0);
end;
function Test2: TBytes;
begin
SetLength(Result,
W dniu 2022-02-21 o 13:34, gabor via fpc-pascal pisze:
W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze:
Oh my, I was confusing my terms I think. I wanted to do bit masking (I
think it's called). I was expecting there to be something like
TestFlag in the RTL since I can
W dniu 2022-02-21 o 13:18, Ryan Joseph via fpc-pascal pisze:
Oh my, I was confusing my terms I think. I wanted to do bit masking (I think it's
called). I was expecting there to be something like TestFlag in the RTL since I can never
remember the syntax "Value = (Value or Index)"
function Tes
3.034000E+0001
2.258000E+0001
2.258000E+0001
- Delphi 10.4.2 Win64
2.152000E+0001
2.153000E+0001
3.034000E+0001
3.035000E+0001
2.258000E+0001
2.258000E+0001
Gabor
___
fpc-pascal
Hi All,
I need to know the current position is after the last element. The
attached solution demonstrate what I want.
Is an internal solution exists for this task? I not found anything.
Gabor
uses SysUtils, Generics.Collections;
type
TR=record
i:Integer;
end;
TLEnumerator=class
W dniu 2021-06-14 o 22:25, Michael Van Canneyt via fpc-pascal pisze:
On Mon, 14 Jun 2021, gabor via fpc-pascal wrote:
W dniu 2021-06-14 o 21:27, Michael Van Canneyt via fpc-pascal pisze:
On Mon, 14 Jun 2021, gabor via fpc-pascal wrote:
Why does TMemoryStream only implement one version of
W dniu 2021-06-14 o 21:27, Michael Van Canneyt via fpc-pascal pisze:
On Mon, 14 Jun 2021, gabor via fpc-pascal wrote:
Why does TMemoryStream only implement one version of SetSize method?
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/classes/classesh.inc?revision=49038&
Why does TMemoryStream only implement one version of SetSize method?
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/classes/classesh.inc?revision=49038&view=markup#l1225
The TStream class has two versions of SetSize method (virtual, overload)
- one with a parameter of LongInt ty
W dniu 2021-02-13 o 20:38, Sven Barth via fpc-pascal pisze:
Of course this does not provide any mechanism to directly add fields,
however the compiler could in theory optimize access through property
getters/setters if they're accessed through the surrounding class
instance instead of the inter
Hi All,
I try to convert some C++ source to FPC, see below a short example from
it. How can I define same operator with FPC trunk?
class Cla
{
INT64 Num;
public:
Cla operator +(const Cla& m)
{
Cla ret(this);
ret.Num += m.Num;
return ret;
}
G
W dniu 2020-12-26 o 16:34, Tomas Hajny via fpc-pascal pisze:
On 2020-12-26 15:45, gabor via fpc-pascal wrote:
W dniu 2020-12-22 o 04:57, Nikolay Nikolov via fpc-pascal pisze:
.
.
Very interesting. But in a future version of the FV (or other TUI
framework) apart from migrating from
W dniu 2020-12-22 o 04:57, Nikolay Nikolov via fpc-pascal pisze:
Anyway, any interest to develop Free Vision further is very welcome one,
so we can move it from past tense to a future one. I still think text mode
UI for console and terminals still has a place, but sadly the current FV
implementat
W dniu 2020-12-23 o 14:27, Graeme Geldenhuys via fpc-pascal pisze:
On 22/12/2020 10:20 pm, gabor via fpc-pascal wrote:
Sorry, I keep mistaking code point for character. I thought that the
code point is a value in the range 0..10. I don't think I fully
understand Unicode...
Here
W dniu 2020-12-22 o 11:13, Marco van de Voort via fpc-pascal pisze:
The problem is that multiple unicode codepoints might translate to one
character. But that character might have variable width (1, 1.5, 2). And
the rendering of codepoints to characters is output device (terminal,
GUI canvas) d
W dniu 2020-12-21 o 23:41, Sven Barth via fpc-pascal pisze:
> The main restriction is that it only supports ShortString and thus has
> no Unicode support.
I wonder which type would be best suited to store a unicode character
(code point) for the screen buffer?
type
TScreenBuffer = array of r
OK,
is it possible to define the TMyRecord with default values so that
when I do Default(TMyRecord) it will be non-zero defaults written
instead of zeros?
You can define typed constant and assign it to variable.
type
TMyRecord = record
X, Y: Integer;
S: String;
end;
const
MYDEFRE
W dniu 2020-10-04 o 21:58, James Richters via fpc-pascal pisze:
DoSomethingElse([$12,$1A,$2B]);for example… of course this doesn’t work,
but is there a syntax that would work?
This expression works fine with FPC 3.2.0
___
fpc-pascal maillist - fpc-p
2020. 07. 25. 18:42 keltezéssel, Florian Klämpfl írta:
Am 25.07.20 um 16:49 schrieb Gabor Boros:
Hi All,
I cannot show the real application but attached a simple example.
If compile with 3.2.0 "ppc386.exe -O3 test.pas" the execution time of
the resulting example binary is 0.4s, a
Hi All,
I cannot show the real application but attached a simple example.
If compile with 3.2.0 "ppc386.exe -O3 test.pas" the execution time of
the resulting example binary is 0.4s, and 2.2s if compile with
"ppcx64.exe -O3 test.pas". Any idea why?
Gabor
{$Mode ob
2020. 04. 01. 17:21 keltezéssel, Marco van de Voort írta:
But at least FPC3.2.0rc1 has a rewritten tprocess/runcommand that makes
this fixable without source changes and recompilation, look at the next
example:
It's fast but FPC's help not showed on the scre
2020. 03. 31. 19:37 keltezéssel, Gabor Boros írta:
RunCommandInDir('E:\FPC\3.2.0\bin\i386-win32','fpc.exe',['-h'],OS,[]);
Tried with modified(fpc -h) "Reading large output" example
(https://wiki.freepascal.org/Executing_External_Programs#Reading_la
2020. 03. 31. 23:31 keltezéssel, Alexander Grotewohl írta:
The other though I had is that your E: is going to sleep while you're
programming and the first execution requires the drive to spin up again.
Same result if use a ramdisk.
Gabor
__
2020. 03. 31. 23:21 keltezéssel, Marco van de Voort írta:
Antivirus?
No.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Windows 10 64bit.)
var
Start:TDateTime;
OS:String;
begin
Start:=Now;
RunCommandInDir('E:\FPC\3.2.0\bin\i386-win32','fpc.exe',['-h'],OS,[]);
WriteLn(FormatDateTime('nn:ss.zzz',Now-Start));
Gabor
__
Hi All,
var
DT:TDateTime;
begin
Writeln(BoolToStr(TryStrToDate('1',DT),True));
The result of above code is "True" with FPC and "False" with Delphi.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.or
n 0;
}
The result of this simple example on the screen is:
var1(4)
Can I do the same thing with FPC in a simple way? I translate some C
source to FPC and try to follow the original code.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepas
d with CP_NONE
codepage for a Linux/Windows multi platform application. Any idea?
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
W dniu 2019-06-19 o 17:10, Ryan Joseph pisze:
Oh I see now. Strange syntax, never saw that before. Can you get the full path
instead of just the name?
Regards,
Ryan Joseph
Unfortunately, just the name. But it's a good idea to be able to have a
full path.
You can get full listof dire
try
writeln({$I %FILE%});
it really works ;)
Regards,
Michał
W dniu 2019-06-19 o 16:54, Ryan Joseph pisze:
On Jun 19, 2019, at 10:52 AM, Виктор Матузенко wrote:
{$I %FILE%} ?
Sorry I mean something like:
{$macro on}
writeln(FPC_SOURCE_FILE);
Looking for a string I can use.
Regards,
Hello
Typed constants work just like initialized variables. Maybethis is the
problem?
Try:
MYINTEGERCONST = 5;
or
MYINTEGERCONST = Integer(5);
Regards,
Michał.
W dniu 2019-06-12 o 22:25, Simon Ameis pisze:
Hello,
I'm just porting some C code to pascal. This code contains constant
structure
)
then build up XMLs from it a save back to file(s). Without lost any
"TDOMNode.TextContent".
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
2019. 04. 28. 21:24 keltezéssel, Santiago A. írta:
If you need the same indent or special chars, XML is not the right
format for you.
Consider it
XML is not my choice. ;-)
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http
2019. 04. 28. 9:25 keltezéssel, Gabor Boros írta:
The "indent" and "text content" problems solved on the reader side by
ReadXMLFilePreserveWhitespace:
With a sample application but not with the real life application. :-(
(My real application just find node for every
2019. 04. 28. 9:35 keltezéssel, Michael Van Canneyt írta:
the newly exposed XMLWriter
Will be merged/backported into fixes_3_2?
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo
fo is
discarded on read (I would need to veify) so this would require lots of
rewriting.
The "indent" and "text content" problems solved on the reader side by
ReadXMLFilePreserveWhitespace:
http://wiki.freepascal.org/XML_Tutorial#Whi
idea how to solve this problem? (I use fixes_3_2.)
X:=TXMLDocument.Create;
ReadXMLFile(X,'INPUT.xml');
WriteXMLFile(X,'OUTPUT.xml');
Gabor
http://www.w3.org/2001/XMLSchema-instance";>
a
X > Y
http://www.w3.org/2001/XMLSchema
Hi.
Probably can be done with RTTI (1), enumerators (2) and generics (3)
together.
1. https://stackoverflow.com/questions/27803383/fpc-rtti-on-records
2. http://wiki.freepascal.org/for-in_loop#Traversing_container
3. http://wiki.freepascal.org/Generics
Michał.
W dniu 2018-07-09 o 18:22, Ryan
hile tried xmlSchemaSetValidStructuredErrors and that works with
Win32, Win64 and Linux 64bit.
Is libxml package have a maintainer or is it a legacy/deprecated thing?
I experienced some differences between the documentation of libxml2 and
the "Interfaces for validating" section in xml
Same problem with Win64. So not Linux specific.
Gabor
2018. 05. 22. 10:06 keltezéssel, Gabor Boros írta:
Hi All,
I need to accomplish validate XML files with an XSD. Found libxml in
packages and works as expected with Win32. But I have problem with
messages on Linux 64bit. Got %s instead
?
var
SL_Warning,SL_Error:TStringList;
procedure SchemaValidityWarningFunc(ctx: Pointer; const msg: PChar);
begin
SL_Warning.Add(msg);
end;
procedure SchemaValidityErrorFunc(ctx: Pointer; const msg: PChar);
begin
SL_Error.Add(msg);
end;
Gabor
___
fpc
teChar:=#0; solved my problem. But strange if the TStringList
think from a starting " the string is quoted. For example if data.cvs
contains "abc|89|0 I got the next result with my example program
(without QuoteChar trick): 0 * abc|89|0
Gabor
__
2017. 08. 16. 15:15 keltezéssel, Kevin Jesshope írta:
Setting the quotechar to something impossible (linefeed, #0 etc) stops
the quote processing.
SL2.QuoteChar:=#0; solved my problem. Thank you!
Gabor
___
fpc-pascal maillist - fpc-pascal
OV. See 4 * O
and 5 * fdsfds. Why?
Gabor
84392|asfds|hytr|43421454|"O" fdsfds|654645645 "O"
fdsfsd|hgfgfedw|fg|321.544|89|0program Project1;
uses Classes, sysutils;
var
SL,SL2:TStringList;
i:integer;
begin
SL:=TStringList.Create;
SL.LoadFromFile('data.csv');
then Caption:='Assigned';
end;
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
xample.
procedure TForm1.FormCreate(Sender: TObject);
var
x:TPanel;
begin
x.Free;
end;
With Linux no error (x is Nil before the Free call), with Windows got
SIGSEGV (x is not Nil before the Free call). Is it a Lazarus thing or
come from FPC?
Gabor
__
This significantly complicates my project. I would avoid this.
After a few tests, I can say that it works correctly with the linked
system unit and cmem. Unfortunately, this greatly complicates build
process which is disproportionate to amount of code. So I decided to do
it in C for now.
Than
I was hoping that maybe there is an easy answer. But I understand.
Thanks.
Michał.
W dniu 2017-01-19 o 20:28, Jonas Maebe pisze:
It is therefore not possible to give an answer to your question that is
generally valid. Furthermore, the answer could become wrong at any time
because all of that is
Hello!
I would like to write some code that will be static linked with C
application. In addition, I would like to avoid linking system and rtl
units and would use only routines that come with C app and library (I
heard that combining fpc rtl with C application is not a good idea and
there are
reate;
SL.DelimitedText:=' 0.0000.0007.0000.000 29.6628';
for i:=0 to SL.Count-1 do
begin
WriteLn('*'+SL.Strings[i]+'*');
end;
ReadLn;
end.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.
Hello.
Is there serious reason that TReader/TWriter does not support interface
type properties, or just not yet implemented?
Regards,
Michał.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listi
. So, the results are same with FPC
and Delphi.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
eDate(2016,10,20);
V := D;
writeln('date is ',VarType(D));
end.
The result is: "date is 5" (varDouble)
If modify D: TDate; to D: TDateTime; the result is "date is 7" (varDate)
I (We) missed something or is this a bug?
Gabor
2016. 10. 27. 4:29 keltezéssel, Graeme Geldenhuys írta:
On 2016-10-26 14:58, Gabor Boros wrote:
Can I open it
without decompress it to the file system
Yes, simply use any component that implements the LZMA/LZMA2 compression
algorithms. You should then be able to decompress it in memory. I
Hi All,
I need to analyze log file but its compressed with XZ. Can I open it
without decompress it to the file system or can decompress in memory for
example into a TStringList?
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http
Anyone knows if Windows 7 would also work?
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Installation_Notes#Operating_System_Requirements
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin
2016. 08. 23. 17:40 keltezéssel, Dennis írta:
I miss its lightning fast compiler and good debugger.
+1
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
2016. 06. 29. 17:11 keltezéssel, Dimitrios Chr. Ioannidis írta:
AFAIK, the Firebird New API is interface based not a C++ API.
Thank you for the clarification! (Firebird written in C/C++ and 3.0 have
a new OO API, from this combination I think the new API is C++. :-) ).
Gabor
l solution?
Sorry for the dumb question I am a pascal guy and not have C/C++ knowledge.
https://github.com/FirebirdSQL/firebird/blob/B3_0_Release/src/include/gen/Firebird.pas
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepasca
lazbuild has option "--add-package"
W dniu 2015-09-24 o 16:09, Graeme Geldenhuys pisze:
On 2015-09-24 15:03, Marco van de Voort wrote:
Lazarus has lazbuild to simply compile a project from the commandline.
How is it going to know where to find packages if you haven't run the
Lazarus IDE and
2015.08.07. 13:13 keltezéssel, Gour írta:
I wonder, being FPC noob, how suitable it can be for learning FPC?
Hi,
The official documentation is not a good start point?
http://www.freepascal.org/docs.var
http://wiki.freepascal.org/FPC_documentation
Gabor
Hi All,
Added ixUnique type index with IndexDefs or AddIndex, set IndexName or
IndexFieldNames. But no effect, I can add same field values without any
error.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http
2013.12.26. 18:03 keltezéssel, Pierre Free Pascal írta:
Please test again.
Sorry for the mistake.
Pierre Muller
Downloaded, installed and works like a charm.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http
idn't work.
Greetings
Gerhard
Hi,
I downloaded from 4-5 mirrors and got same error message.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
://sourceforge.net/projects/freepascal/files/Win32/2.6.2/fpc-2.6.2.x86_64-win64.exe/download
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
http://sourceforge.net/projects/freepascal/files/Win32/2.6.2/fpc-2.6.2.x86_64-win64.exe/download
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
323&tstart=0
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hi,
I don't know the answer for your question but I know a separate Lazarus
mailing list exist.
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Gabor
Jürgen Hestermann írta:
I am not sure whether there exists a separate mailing list just for
Lazarus so I am posting this
Hi,
ftp://ftp.freepascal.org/pub/fpc/dist/2.2.4/docs
Gabor
Graeme Geldenhuys írta:
Hi,
FPC 2.2.4 has already been released a while back, but the
documentation available for download (PDF files) are rather old. Could
new docs be generated and made available for download. Not everybody
has the
leledumbo írta:
What's the output of this:
FormatDateTime(' dd hh:nn:ss ',Now);
március 04 09:42:02 2009
that way you can understand what you should supply to ScanDateTime as the
corresponding value for format. I mean, maybe it's not November, but
something else equivalent in
And? I don't understand your suggestion.
leledumbo írta:
Gabor Boros wrote:
Hi,
I want to convert a string to a TDateTime variable.
In example the string is: 'November 21 09:42:21 2008'.
I tried ScanDateTime with ' dd hh:nn:ss ' pattern but not
working. Ho
Hi,
I want to convert a string to a TDateTime variable.
In example the string is: 'November 21 09:42:21 2008'.
I tried ScanDateTime with ' dd hh:nn:ss ' pattern but not
working. How can I convert this type of string
Hello,
I'm trying to convert c header code from "Windows Mobile API 5" to
pascal and I'm getting wrong size of converted record:
original c header:
typedef struct _DDPIXELFORMAT
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwFourCC;
union
{
DWORD dwRGBB
the whole string(bbb aaa).
And I don't know how many piece contain the string. In example: 'Mr. aaa
bbb' or 'Mr. aaa von bbb'. Can SScanf return the whole string?
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Thank you!
Gabor
JoshyFun írta:
Look for "SScanf" function, maybe it will fit your needs.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
l exists in FPC or Lazarus for this problem.
If anybody understood me. ;-)
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hi,
5191 works very well for me.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Many thanks Felipe, the problem is the exported name(s).
The exported names is SCAN_AllocateBuffer_A and SCAN_AllocateBuffer_W.
Thanks again!
Gabor
Felipe Monteiro de Carvalho írta:
Can you show us the c declaration of the function you are calling? It
should be on a .h file.
Also, you should
le:=LoadLibrary('SCNAPI32.DLL');
Pointer(SCAN_AllocateBuffer):=GetProcedureAddress(DLL_Handle,
'SCAN_AllocateBuffer');
ScanBuffer:=SCAN_AllocateBuffer(TRUE,dwScanSize);
UnloadLibrary(DLL_Handle);
end.
Thanks!
Gabor
___
Hi,
If I start the test application on the WinCE device the result is:
"project1.exe is not a valid Windows CE application."
If I comment out the SCAN_FindFirst call, the application run properly.
See below for the C header, and the test app.
Any suggestions?
Many Thanks!
Gabor
Th
Hi,
The problem is, missed keyword 'class' in zipper.pp line 368 and 439.
Gabor
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
82 matches
Mail list logo