Am 16.07.2018 um 13:40 schrieb Santiago A.:
> for var i:integer:=1 to 100 do
> begin
> <...>
> end;
What is the benefit? Poorer readability?
g
Michael
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Am 23.04.2018 um 13:39 schrieb Michael Van Canneyt:
>> Can I save the comments in the DocComment property of every element or
>> is this used somewhere else?
>
> It's normally not used; The idea is to use this in a pasdoc->fpdoc
> converter.
Great, then I will capture it for my project.
Thanks.
Am 23.04.2018 um 12:43 schrieb Mattias Gaertner:
>> I found TPasTreeContainer.NeedComments but it does nothing.
>
> Set that to true. Then create the parser.
Ok, so I can not use the function ParseSource from unit PParser anymore
and have to write my own one?
> Read Parser.SavedComments on
Hi,
while working with fcl-passrc I search for a possibility to get the
comments of a source file in the parsed tree.
I found TPasTreeContainer.NeedComments but it does nothing.
Am I missing something or is this not a feature of fcl-passrc?
thanks
Michael
Am 03.11.2017 um 15:31 schrieb Michael Van Canneyt:
> In this case, you can probably simply use
> TPasTreeContainer.FinishScope
> to record the end of the method.
Great, this is easy. I have created (and attached) a patch to add a
SourceEndLinenummer for all elements.
Maybe it is useful for
Sorry, some message were not sent to list, my fault:
Am 03.11.2017 um 14:132 schrieb Michael Van Canneyt:
>> Are there plans for a support in future? Or can you give me some
>> advices how I can implement this by myself? I'm afraid I am an
>> absolutly newbie in this part of of the FCL.>
>
Hi,
a question to TPasElement of fcl-passrc:
To get the line in which the element starts I use the public
SourceLinenumber field. But how do I get the last line of this element?
g
Michael
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Am 14.03.2015 um 13:21 schrieb Michael Van Canneyt:
Now I've got to
start looking for an acceptable alternative- preferably one that
operates by European rules rather than American ones.
What do you mean by this ? How would these rules differ ?
I wasn't aware that rules existed ?
See the
Am 14.03.2015 um 13:21 schrieb Michael Van Canneyt:
Now I've got to
start looking for an acceptable alternative- preferably one that
operates by European rules rather than American ones.
What do you mean by this ? How would these rules differ ?
I wasn't aware that rules existed ? :)
See the
Am 09.02.2014 13:05, schrieb Fred van Stappen:
if length(MyArray) 0 then
for x := 0 to high(MyArray) do
MyArray[x].Free;
But, if i use :
setlength(MyArray, 0) ;
would it do the same job ?
No. Your array contains only references to the objects. The references
where deleted, but
Hello,
I try to define classes with properties an additional fluent setters.
Unfortunally the compiler does not allow the fluent methods have the
same names as the properties.
project1.lpr(18,24)
Error: overloaded identifier MyString isn't a function
Of course I could rename these methods
Am 11.03.2013 16:27, schrieb Michael Van Canneyt:
Can anybody apply this patch to the trunk?
Done.
Thank you.
Michael
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Am 31.10.2012 10:54, schrieb Michael Fuchs:
It works, but the heap trace shows a bunch of memory leaks.
...
Is this a bug or am I doing something wrong?
For information: I created an entry in the bug tracker for this problem:
http://bugs.freepascal.org/view.php?id=23247
Hello,
I found
Am 28.02.2013 10:56, schrieb Sven Barth:
[...] Features like type inference, duck
typing, aspect oriented programming and traits. By implementing them we
can attract developers which got used to such features and swear that
they can simplyfy work.
But there should be a line that nobody will
Am 08.01.2013 23:43, schrieb Paul Ishenin:
What is the best way for a discussion on this? Should I create a feature
request in bugtracker?
First create a desired implementation with a patch.
I would do it, if I only know where to start. Unfortunately are my
experiences in compiler
Am 08.01.2013 09:44, schrieb Krzysztof:
I like when Free Pascal trying to implement best practices from other
languages. That was with increment variable using assign operator: i += 1.
Anyway, few days ago I analyzed C++ code and I liked one syntax:
if ( ( i = GetSomeValue ) = 10 ) {
//
Am 08.01.2013 13:06, schrieb Howard Page-Clark:
TAbstractClass = class abstract(TObject)
'Casting' a class as abstract is curious syntax. What led you to think
of that? But obviously the compiler knows it.
This is no casting, it is the new abstract class syntax coming from delphi.
As
Am 08.01.2013 13:29, schrieb Paul Ishenin:
Abstract class feature is implemented the same way as it is done in
delphi. In delphi it does not raise any error, so it works in FPC. The
only limitation is that you can't both set sealed and abstract for the
same class.
Maybe later delphi will come
Am 08.01.2013 17:33, schrieb Graeme Geldenhuys:
+1
The current behaviour (even if Delphi compatible) seems just wrong -
totally defeats the point of abstract in object design!
What is the best way for a discussion on this? Should I create a feature
request in bugtracker?
Michael
Am 09.11.2012 20:53, schrieb waldo kitty:
when you add additional libraries to your FPC and/or Lazarus
installation, how do you normally do it? where do you normally place them?
i'm thinking of libraries like synapse, fpGUI, tiOPF and similar...
It depends. If the libraries contains GUI
Am 16.10.2012 12:59, schrieb Michael Fuchs:
...
It works, but the heap trace shows a bunch of memory leaks.
...
Is this a bug or am I doing something wrong?
For information: I created an entry in the bug tracker for this problem:
http://bugs.freepascal.org/view.php?id=23247
Michael
Hello,
I wrote a simple test program with SQLite3db
program SqliteMemoryLeak;
{$mode objfpc}{$H+}
uses
HeapTrc, {$IFDEF UNIX}{$IFDEF UseCThreads}CThreads,{$ENDIF}{$ENDIF}
Classes, SysUtils, SQLite3db;
var
X: TSQLite;
S: TStringList;
begin
try
S := TStringList.Create;
X :=
Am 22.12.2011 21:37, schrieb Rainer Stratmann:
procedure fwproc; forward;
procedure myprocedure;
begin
fwproc;
end;
procedure fwproc;
begin
end;
Bad example, in this case there is no need for implementing fwproc after
myprocedure.
g
Michael
Am 18.10.2011 21:42, schrieb Sven Barth:
For anonymous functions you can take a look at Embarcadero's Delphi help
here:
http://docwiki.embarcadero.com/RADStudio/en/Anonymous_Methods_in_Delphi
The Embarcadero style of anonymous functions does not satify me.
myFunc := function(x, y: Integer):
Am 19.10.2011 10:16, schrieb Sven Barth:
I would prefer a style like
myfunc := @function(x, y: Integer): Integer Result := x + y;
And how would you create more complex functions? In Pascal code blocks
are started with begin and ended with end. I don't see a reason why
anonymous methods should
Am 19.10.2011 20:30, schrieb Florian Klämpfl:
I still don't see why this cannot be done by procedure variables: one
can easily pass a procedure reference to a compare function to any sort
library call.
It is maybe easier to write a anonymous function inline than declaring a
function and
Hello,
WriteLn(FloatToStr(100 / 0));
This code prints on the screen +Inf, but I think it should be NaN.
Is this a bug or a special case in computer arithmetic?
thx
Michael
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Am 23.08.2011 09:16, schrieb Andreas Schneider:
This code prints on the screen +Inf, but I think it should be NaN.
Is this a bug or a special case in computer arithmetic?
http://en.wikipedia.org/wiki/Division_by_zero#In_computer_arithmetic
Oh, thank you. I should not read only the german
Hello,
I know how to find published properties with TypeInfo, but how can I
find methods?
type
MyClass = class(TObject)
published
function Function1(APara: String): LongInt;
function Function2(APara: String): Boolean;
function Function2(APara: Integer): LongInt;
end;
Am 26.05.2011 12:03, schrieb Jonas Maebe:
I know how to find published properties with TypeInfo, but how can I
find methods?
This test checks that functionality:
http://svn.freepascal.org/svn/fpc/trunk/tests/webtbs/tw12038.pp
Sorry, maybe I am to stupid, but if I understand this test it only
Hello,
if I understand the documentation correct, this is the only way using a
property in an interface:
IMyInterface = interface
function GetTag: Integer;
procedure SetTag(AValue: Integer);
property Tag: Integer read GetTag write SetTag;
end;
Or exists a possibilty to
Am 28.02.2011 14:17, schrieb Sven Barth:
As far as I'm aware of: There are none.
There is ERangeError though (in SysUtils), but that's not an equivalent
for ArgumentOutOfRangeException (I suppose that inherits from
ArgumentException?).
Yes,and all Argument..Exceptions have a property
Hello,
while porting software from .NET to FreePascal I am looking for some
exceptions for recurrent errors. For example:
ArgumentException, ArgumentNullException, ArgumentOutOfRangeException
Is there a unit which defines those exceptions?
regards
Michael
Frank Church schrieb:
if [dbgRemoteLinks] in dbgActiveOptions then
mmoURLPageContent.Lines.AddStrings(procList);
Try
if dbgRemoteLinks in dbgActiveOptions then
WriteLn('Yes');
htht
Michael
___
fpc-pascal maillist -
Graeme Geldenhuys schrieb:
Is someone using fpc to develop in such devices?
If it runs the Symbian S60 OS, then the answer is no. I have the Nokia
5800XM and also wanted to write software for it using FPC, but I can't.
Maybe while waiting for a Symbian compiler you can try MIDlet Pascal,
Graeme Geldenhuys schrieb:
I currently use Dia Diagram editor to design UML diagrams, but as
far as I know it does generate any code. :-(
Try
http://www.uni-ulm.de/~s_mgerla/dia2pas.html
mfg
Michael
___
fpc-pascal maillist -
Ryan Mann schrieb:
[..] Instead of using the IDE to design graphical interfaces,
is it possible to write a graphical interface using Pascal code?
Of course, you can create all components dynamicly and give them their
positions by code. It is like programming with Turbo Vision/Free Vision.
g
Paul schrieb:
I'm testing with FPC/Lazrus on Windows now, but a simple program results
in 11.5 MB size.
I have enabled -Xs, -CX, -Og, -O2 in the project-compiler options
(Lazarus), but the size is still the same.
Anything else I should do?
Use
strip --strip-all $PROGRAMNAME.exe
after
Paul schrieb:
I've read that, but isn't it suppose to work within the ide instead of
always start the cmd prompt and type in this ?
(or use a batch)
Project - Compilersettings - [Last Tab] - Execute after
(I hope this is right, i've only the german version here).
Will this work for WinCE
Hi,
if I compile a pas file with 2.2.0, fpc send some information to console.
D:\fpc xarray.pas
Target OS: Win32 for i386
Compiling xarray.pas
Linking xarray.exe
39 lines compiled, 0.1 sec , 35120 bytes code, 1656 bytes data
Now with 2.2.2 I need -vi to get these infos. Without the
Marco van de Voort schrieb:
Now with 2.2.2 I need -vi to get these infos. Without the parameter the
console stays blank. Is this intended?
-vi is always needed. Usually, for a release, there is -viwh in your fpc.cfg.
Could you check if this is the case for 2.2.2 ?
Surprisingly, I don't
Rainer Stratmann schrieb:
May be it has nothing to do with this list, but was there a meeting in
Nürnberg/Germany?
I read this somewhere.
Hi Rainer,
it was a meeting of the Lazarusforum, from 1.-3. August. More infos:
http://www.lazarusforum.de/viewtopic.php?t=1701
hth
Michael
Hello,
I try to implement some lists, so I can use them like the List(of X)
in VB.NET. What is the best way to do this?
1.) Make some new classes, derived from TFPObjectList and overwrite the
Add/Extract/Remove/... -functions?
2.) Make a new class with a private TFPObjectList and hand over
Marco van de Voort schrieb:
As far as I can see this is
no real advantage, except allowing dots in unitnames.
That is what I want. :-)
Ok, the better way are child units, but the dots would be a nice feature.
g
Micha
___
fpc-pascal maillist -
Vinzent Hoefler schrieb:
I think more interesting are dots in unit name for making better
namespaces.
Actually, I'm thinking child units.
You mean like in Ada? Yes, this would be great.
Are there any plans to implement this in future versions?
Micha
Bee schrieb:
Why cant FPC use unit that has (some) dot(s) within the file name? Can
FPC support it in the next release (2.2.2)?
I think more interesting are dots in unit name for making better namespaces.
If I have a class called TSpecialButton, I want a unit name like
Michael Van Canneyt schrieb:
unit Blah;
Namespace MyAPI.Blah;
And how will you know which namespace is in what unit (or file) ?
You then need a second structure mapping namespaces on filenames, making it
slower, bulkier and error prone. The cure is worse than the disease, IMHO.
You are
47 matches
Mail list logo