Bihar Anwar schreef:
I've tried to use Move() instead of Copy(). Any objection with the following
code?
Yes, at first glance without much thinking, I don't think it is safe. Did you think
through the consequences of copying reference counted types (ansistring in this case
presumably)?
v
At least a file identifier always means the same memory address (where
the record data is stored). If needed (for some special purpose) I *can*
typecast it because I know the address of the data (@myfile). But when
using the identifier of a dynamic array then this identifier does not
always mean t
I agree that the introduction of managed data types is inconsistent with
previous Pascal data types. Perhaps it is a design flaw to have changed
the semantics of reference-counted data types. Perhaps not.
Nevertheless, it has been this way for many, many years and will not be
changed at this po
...
In addition, when starting to use Pascal, don't use pointers, and don't
invent linked lists, it's been done so many times.
Go look up the source code in contnrs.pp to understand lists and
containers already available in FPC.
Most programming can be done without untyped pointers.
Best regar
Question: who wants to add it?
Felipe Monteiro de Carvalho wrote:
>
> On Tue, Apr 27, 2010 at 10:18 PM, Anthony Walter wrote:
>> I believe there would first need to be some sort ofg consensus within the
>> community about the changing the syntax.
>
> If both syntaxes are supported I don't thi
> I would like to limit the actual type in this list to be a child class of
TObject. Is
> this possible and if yes, how can it be done?
I don't think it's currently supported. It will be, if someone is willing to
do it.
> In a more general question, what are the differences between the FPC
> g
I've tried to use Move() instead of Copy(). Any objection with the following
code?
var
a: array of string;
SetLength(a, 5);
a[0] := 'aa'; a[1] := 'bb'; a[2] := 'cc'; a[3] := 'dd'; a[4] := 'ee';
System.Move(a[3], a[0], 2 * SizeOf(string) );// instead of a := Copy(a, 3,
2);
SetLength(a, 2
On Wed, Apr 28, 2010 at 7:24 AM, Bihar Anwar wrote:
> Ok, I'll try to observe the compiled code using debugger and benchmark it if
> needed. BTW, what do you mean by allocating memory directly? Is there another
> way to allocate memory for dynamic array besides using SetLength()?
Copy() (from t
Ok, I'll try to observe the compiled code using debugger and benchmark it if
needed. BTW, what do you mean by allocating memory directly? Is there another
way to allocate memory for dynamic array besides using SetLength()?
- Original Message
From: Henry Vermaak
To: FPC-Pascal users d
On 27 April 2010 18:34, Bihar Anwar wrote:
>
> Would Move() be faster, instead of Copy()?
I guess so, have you tried to benchmark? If you really need speed,
why don't you allocate the memory directly?
Henry
___
fpc-pascal maillist - fpc-pascal@lists
Florian Klaempfl schreef:
Frank Church schrieb:
What project management tool does FPC and Lazarus developers use? I
mean besides mantis for bug tracking?
None, simply because we don't have any time budgets/resources but people
are working as soon as they find time.
I am thinking along the li
On Tue, Apr 27, 2010 at 10:18 PM, Anthony Walter wrote:
> I believe there would first need to be some sort ofg consensus within the
> community about the changing the syntax.
If both syntaxes are supported I don't think many people will be against it.
--
Felipe Monteiro de Carvalho
"Technical limitations aside, at this point what would be needed from the
community to get the generic syntax changed?:
: Patches.
I believe there would first need to be some sort ofg consensus within the
community about the changing the syntax.
___
fpc
In our previous episode, Frank Church said:
> attempt is based on the method here,
> https://forums.codegear.com/thread.jspa?threadID=16074, but
> StrToDateTime in FPC does not use the FormatSettings parameter.
Datetime handling has been rewritten since 2.4.0, and this is already merged
back to 2.
In our previous episode, Anthony Walter said:
> Technical limitations aside, at this point what would be needed from the
> community to get the generic syntax changed?
Patches.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.fre
In our previous episode, Lee Jenkins said:
> This isn't still true for latter version of FPC like 2.4.1, right?
>
> http://wiki.freepascal.org/XML_Tutorial#Printing_the_names_of_nodes
>
> "A quick note on navigating the DOM tree: When you need to access nodes in
> sequence, it is best to use Fir
In our previous episode, Michael Van Canneyt said:
>
> As soon as I get around to some bugfixing, I'll have a look at these.
Shouldn't we create some testsuite for fcl-passrc? (or have a flag in the
existing testsuite to exclude tests from fcl-passrc or real compiler tests
or so?)
_
Anthony Walter schrieb:
> Graeme:
>
> "To be honest, this is a slightly unfair case, saying Free Pascal must
> become Delphi compatible, when Free Pascal had generics support
> *before* Delphi did. Maybe Delphi should become more Free Pascal
> compatible."
>
> I've preemptively disabled this argu
On 27 April 2010 17:43, Frank Church wrote:
> I want to convert a time stamp in -mm-dd hh:mm:ss format to a
> TDatetime in FPC but can't find but haven't found a way yet.
I have written the following for the tiOPF project and us it in our
company projects for all date/time values (including
Frank Church escreveu:
I want to convert a time stamp in -mm-dd hh:mm:ss format to a
TDatetime in FPC but can't find but haven't found a way yet.
A very simple function i use:
function XMLDateTime2DateTime(const XMLDateTime: String): TDateTime;
var
DateOnly: String;
TPos: Integer;
begin
Graeme:
"To be honest, this is a slightly unfair case, saying Free Pascal must
become Delphi compatible, when Free Pascal had generics support
*before* Delphi did. Maybe Delphi should become more Free Pascal
compatible."
I've preemptively disabled this argument so many times in the past. It's
bec
Frank Church escreveu:
Thanks for the link. What is WST? My searches turn up something
related to eclipse.
Web Services Toolkit: http://wiki.lazarus.freepascal.org/Web_Service_Toolkit
Luiz
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.o
On 27 April 2010 20:14, Anthony Walter wrote:
>
> 1) type generic TList = class // ... as is now, the word generic is
> redundant
>
> 2) type TList = class // ... better and in line with Delphi
To be honest, this is a slightly unfair case, saying Free Pascal must
become Delphi compatible, when Fr
Anthony Walter schrieb:
> Technical limitations aside, at this point what would be needed from the
> community to get the generic syntax changed?
1) Delphi mode only
2) not breaking old code i.e. accepting both variants
3) more Delphi generic compatibility
> Supposing I had the soruce
> code cha
Technical limitations aside, at this point what would be needed from the
community to get the generic syntax changed? Supposing I had the soruce code
changes to accommodate the change to remove the "generic" keyword, what
would be needed from the community to approve moving that change into the
lan
Anthony Walter schrieb:
> When I google search for "FPC generics" tohe top result links here:
>
> http://wiki.freepascal.org/Generics
>
> Two cases:
>
> 1) type generic TList = class // ... as is now, the word generic is
> redundant
>
> 2) type TList = class // ... better and in line with Delph
When I google search for "FPC generics" tohe top result links here:
http://wiki.freepascal.org/Generics
Two cases:
1) type generic TList = class // ... as is now, the word generic is
redundant
2) type TList = class // ... better and in line with Delphi
It seems both were on the suggested list.
Anthony Walter schrieb:
> I was on freenode irc #fpc earlier and asked some questions but not
> enough people were online to get an answer.
>
> My question was/is:
>
> Will there ever again come a point where FPC attempts to bring in
> more compatibility with Delphi?
Nobody can predict if
Frank Church schrieb:
> What project management tool does FPC and Lazarus developers use? I
> mean besides mantis for bug tracking?
None, simply because we don't have any time budgets/resources but people
are working as soon as they find time.
> I am thinking along the lines of JIRA, Redmine, Fog
Jürgen Hestermann schrieb:
>> A file type is actually also a record and you cannot access the fields
>> without an explict type cast.
>
> At least a file identifier always means the same memory address (where
> the record data is stored). If needed (for some special purpose) I *can*
> typecast it
- Original Message
From: Henry Vermaak
To: FPC-Pascal users discussions
Sent: Tue, April 27, 2010 10:19:45 PM
>I think the right way to do this is:
>a := copy(a, 3, length(a) - 3);
>Presumably copy optimizes this adequately.
Henry
___
Would
On Tue, 27 Apr 2010, Sven Barth wrote:
Hi!
On 27.04.2010 17:19, Michael Van Canneyt wrote:
Also, program files are not parsed by fcl-passrc, it's limited to units
for now. We would like to be able to eventually parse program files too.
I am all for it. It should not be hard to handle thi
Hi!
On 27.04.2010 17:19, Michael Van Canneyt wrote:
Also, program files are not parsed by fcl-passrc, it's limited to units
for now. We would like to be able to eventually parse program files too.
I am all for it. It should not be hard to handle this; It's like parsing
an implementation bloc
Hello FPC-Pascal,
Tuesday, April 27, 2010, 5:43:30 PM, you wrote:
FC> I switched to using the unixtime value which is also present in the
FC> records I am using, but it does not allow for Daylight Savings Time
FC> and is currently an hour behind. Is there some way the FreePascal
FC> libraries can
Thanks for the link. What is WST? My searches turn up something
related to eclipse.
On 27 April 2010 17:50, Luiz Americo Pereira Camara wrote:
> Frank Church escreveu:
>>
>> I am glad to see someone with an interest in FPCs XML. Do you have
>> some experience with XPath usage in PFC/Lazarus?
>>
>
I was on freenode irc #fpc earlier and asked some questions but not enough
people were online to get an answer.
My question was/is:
Will there ever again come a point where FPC attempts to bring in more
compatibility with Delphi? Specifically, in regards to operator overloading
and generic l
Frank Church escreveu:
I am glad to see someone with an interest in FPCs XML. Do you have
some experience with XPath usage in PFC/Lazarus?
In this program:
http://www.silvioprog.com.br/downloads/Cliente_SOAP_SAH.zip?attredirects=0&d=1
you can find a simple usage of XPath + WST
Luiz
Frank Church wrote:
I am glad to see someone with an interest in FPCs XML. Do you have
some experience with XPath usage in PFC/Lazarus?
No, other than some cursory google searches. I figured I'd be asking about that
myself soon.
--
Warm Regards,
Lee
_
On 27 Apr 2010, at 18:05, Frank Church wrote:
> What project management tool does FPC and Lazarus developers use? I
> mean besides mantis for bug tracking?
> I am thinking along the lines of JIRA, Redmine, Fogbugz etc.
As far as FPC is concerned: none.
> It is hard to get a view of what things
I am glad to see someone with an interest in FPCs XML. Do you have
some experience with XPath usage in PFC/Lazarus?
On 27 April 2010 16:14, Lee Jenkins wrote:
>
> This isn't still true for latter version of FPC like 2.4.1, right?
>
> http://wiki.freepascal.org/XML_Tutorial#Printing_the_names_of_n
What project management tool does FPC and Lazarus developers use? I
mean besides mantis for bug tracking?
I am thinking along the lines of JIRA, Redmine, Fogbugz etc.
It is hard to get a view of what things are progressing or what needs doing,
--
Frank Church
===
http://devb
A file type is actually also a record and you cannot access the fields
without an explict type cast.
At least a file identifier always means the same memory address (where the
record data is stored). If needed (for some special purpose) I *can* typecast
it because I know the address of the dat
I want to convert a time stamp in -mm-dd hh:mm:ss format to a
TDatetime in FPC but can't find but haven't found a way yet. My
attempt is based on the method here,
https://forums.codegear.com/thread.jspa?threadID=16074, but
StrToDateTime in FPC does not use the FormatSettings parameter.
functio
On Sun, 25 Apr 2010, Joseph Montanez wrote:
Okay,
Since there hasn't been a clear response on this I've started my own
website, to start documenting more of the use of each library. However
doing so I am finding some clear issues, and that is some of these
units are not finished all the way.
On 27 April 2010 14:42, Bihar Anwar wrote:
> Just say, I have a dynamic array with size=5, and I want to delete elements
> from the index 0 to 2. Is there a trick (the fastest way) to delete those
> elements (0 to 2) without moving activities?
>
> I've tried to make the dynamic array just pointi
On Mon, 26 Apr 2010, Michalis Kamburelis wrote:
All the talk about the Pascal parser in fcl-passrc got me interested
recently. I did some experiments, and I thought I mention here:
1. I added a simplest example how to use fcl-passrc to the wiki:
http://wiki.freepascal.org/fcl-passrc
This i
This isn't still true for latter version of FPC like 2.4.1, right?
http://wiki.freepascal.org/XML_Tutorial#Printing_the_names_of_nodes
"A quick note on navigating the DOM tree: When you need to access nodes in
sequence, it is best to use FirstChild and NextSibling properties (to iterate
forwa
David Emerson schrieb:
> I'm far more comfortable using git than svn, and if there was such a repo it
> would help lower the barrier to entry for me at least.
I created a mercurial mirror: http://florianklaempfl.de:8000/fpcdocs/
___
fpc-pascal maillis
On Tue, Apr 27, 2010 at 5:42 PM, Bihar Anwar wrote:
> Just say, I have a dynamic array with size=5, and I want to delete elements
> from the index 0 to 2. Is there a trick (the fastest way) to delete those
> elements (0 to 2) without moving activities?
You won't do it faster than this:
var
a:
Just say, I have a dynamic array with size=5, and I want to delete elements
from the index 0 to 2. Is there a trick (the fastest way) to delete those
elements (0 to 2) without moving activities?
I've tried to make the dynamic array just pointing to 3rd element and set a new
length for it, but f
On 4/27/2010 2:04 AM, Jürgen Hestermann wrote:
An identifier should always refer to a memory address/location. If the
type of the data at that memory location is a pointer then it should
be possible to change the expression to the memory address of the data
by dereferencing it with ^. But for d
2010/4/27 spir ☣ :
> -1- untyped pointer allocation
> In case of an untyped pointer, I read the compiler considers the target'size
> is 1 byte. There certainly is an operation to allocate memory for the target
> according to an existing piece of data. Something like
> data := something
> ne
Jürgen Hestermann schrieb:
> There is a lot of ambigouity with dynamic arrays.
There certainly is if you expect them to work like regular arrays.
They are a quite different datatype.
>>> At least it should always mean the same independent from context.
>> It does always mean the same,
On 27 April 2010 04:39, Joseph Montanez wrote:
>
> Spent another hour making a pretty example, found out there was no CSS
> file generated, and made my own:
> http://www.gorilla3d.com/fpdoc/animal/tanimal.talk.html
Nice. I reported the missing CSS file issue years ago. I thought it
was fixed - I
On 27 April 2010 02:00, John wrote:
>>
> I think you missed my point. I don't need 'new developer' documentation for
> OOP. What I can't understand is how the documentation system itself works,
> ie, how to go about using it to contribute documentation.
* Download 'fpdoc.pdf' or 'fpdoc.ps' and
Hello,
Two basic questions about pointer targets (I call target what is pointed to).
-1- untyped pointer allocation
In case of an untyped pointer, I read the compiler considers the target'size is
1 byte. There certainly is an operation to allocate memory for the target
according to an existing
In our previous episode, Joseph Montanez said:
> I just spent 2 hours on FPDoc's trying to get how to use it. Automatic
> documentation was dead easy but the whole XML integration part was a
> nightmare, so I gave up reading the docs on how to use the doc.
> Instead I figure "Hey there must be exam
57 matches
Mail list logo