Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-14 Thread Michael Ring
I also like their products, especially the development boards are very well designed. The IDE+debugger is nice & complete and the support fo the software is also very good. The things I do not like are that you have to buy a license for each compiler family (PIC, PIC16, PIC 32, ARM), the compi

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-14 Thread Roberto P.
Thanks a lot for your comments, very interesting indeed. Can you make a comparison against FPC target-embedded ? I routinely write in C for the microcontrollers I use, but now with ARM Cortex M3 I could try Pascal. I'm just a little afraid of the potentially limited maturity of these. Thanks!

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-14 Thread Rainer Stratmann
Am Thursday 14 March 2013 23:36:58 schrieb Roberto P.: > Hi List, > > has anyone of you had the chance to try this Pascal compiler for embedded > platforms? > > http://www.mikroe.com/mikropascal/ > > Any comment will be appreciated! > > Roberto Yes, good product and good company. I visited the co

[fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-14 Thread Roberto P.
Hi List, has anyone of you had the chance to try this Pascal compiler for embedded platforms? http://www.mikroe.com/mikropascal/ Any comment will be appreciated! Roberto ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepasc

Re: [fpc-pascal] Re: Selective Class Helper

2013-03-14 Thread Mark Morgan Lloyd
Reimar Grabowski wrote: On Thu, 14 Mar 2013 10:48:58 +0200 Juha Manninen wrote: You consider it "magnificent" because you have not written anything complex with it. Please try it yourself. After haunting all the bugs causing crashes and memory leaks it may not feel so magnificent any more. No

Re: [fpc-pascal] Re: Selective Class Helper

2013-03-14 Thread Reimar Grabowski
On Thu, 14 Mar 2013 10:48:58 +0200 Juha Manninen wrote: > You consider it "magnificent" because you have not written anything > complex with it. > Please try it yourself. After haunting all the bugs causing crashes > and memory leaks it may not feel so magnificent any more. No C++ bashing, please

Re: [fpc-pascal] Is it only properties that can have defaults in type definitions?

2013-03-14 Thread Michael Van Canneyt
On Thu, 14 Mar 2013, Frank Church wrote: On 14 March 2013 15:38, Martin wrote: On 14/03/2013 15:35, Frank Church wrote: Is it only properties that can have defaults in type definitions? ie can private fields be only initialized after creation, eg in the constructor? Is something like this

Re: [fpc-pascal] Is it only properties that can have defaults in type definitions?

2013-03-14 Thread Frank Church
On 14 March 2013 15:38, Martin wrote: > On 14/03/2013 15:35, Frank Church wrote: >> >> Is it only properties that can have defaults in type definitions? >> ie can private fields be only initialized after creation, eg in the >> constructor? >> >> Is something like this allowed >> >> TSomeObject = T

Re: [fpc-pascal] Is it only properties that can have defaults in type definitions?

2013-03-14 Thread Martin
On 14/03/2013 15:35, Frank Church wrote: Is it only properties that can have defaults in type definitions? ie can private fields be only initialized after creation, eg in the constructor? Is something like this allowed TSomeObject = TObject private FBoolean: Boolean default false; public

[fpc-pascal] Is it only properties that can have defaults in type definitions?

2013-03-14 Thread Frank Church
Is it only properties that can have defaults in type definitions? ie can private fields be only initialized after creation, eg in the constructor? Is something like this allowed TSomeObject = TObject private FBoolean: Boolean default false; public FPublishedBoolean: Boolean read FBoolean writ

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Xiangrong Fang
Thanks for the explanation. Now I see why my program some time crashed at gtk2*.inc... 2013/3/14 Martin > On 14/03/2013 09:47, Jonas Maebe wrote: > > > On 14 Mar 2013, at 01:48, Xiangrong Fang wrote: > > The document said it is "deprecated"? Also, I want this to be cross > platform, not for u

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Martin
On 14/03/2013 09:47, Jonas Maebe wrote: On 14 Mar 2013, at 01:48, Xiangrong Fang wrote: The document said it is "deprecated"? Also, I want this to be cross platform, not for unix only. The use case is: try buf := GetMemory(1024); size := 10240; stream.Read(buf^, size); except ?? end; T

Re: [fpc-pascal] Re: two questions about dynamic array

2013-03-14 Thread Howard Page-Clark
On 14/03/13 7:59, Mattias Gaertner wrote: Xiangrong wanted to know if the above array is initialized. If you want to test that then you have to either single step via the debugger or to compare the allocated memory before and after. The problem is that you do not know the memory position before

Re: [fpc-pascal] about "reference-counted" variables

2013-03-14 Thread Sven Barth
Am 14.03.2013 10:14 schrieb "Marco van de Voort" : > Also widestrings are not refcounted on the pascal level, but "managed". But only on Windows platforms, because there WideString is based on Windows' COM compatible string. Regards, Sven ___ fpc-pascal

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Jonas Maebe
On 14 Mar 2013, at 11:16, Tomas Hajny wrote: On Thu, March 14, 2013 09:23, Xiangrong Fang wrote: I am sorry that was what I thought, but does not work, see screenshot attached. The screenshot does not show where exactly the problem happens (except for the address, but that is useless with

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Tomas Hajny
On Thu, March 14, 2013 09:23, Xiangrong Fang wrote: > 2013/3/14 Mattias Gaertner >> On Thu, 14 Mar 2013 07:05:21 +0800 >> Xiangrong Fang wrote: >> >> > Is it possible to use try...except to catch SIGSEGV? >> >> yes. The exception class is EAccessViolation. > > I am sorry that was what I thought,

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Jonas Maebe
On 14 Mar 2013, at 01:48, Xiangrong Fang wrote: The document said it is "deprecated"? Also, I want this to be cross platform, not for unix only. The use case is: try buf := GetMemory(1024); size := 10240; stream.Read(buf^, size); except ?? end; That use case is a textbook example of why

Re: [fpc-pascal] about "reference-counted" variables

2013-03-14 Thread Marco van de Voort
In our previous episode, Xiangrong Fang said: > > Also widestrings are not refcounted on the pascal level, but "managed". > > > What's the implication of the difference between refcounted vs. "managed"? There is a refcount system in the pascal RTL for internal types. Some types are externally mana

Re: [fpc-pascal] about "reference-counted" variables

2013-03-14 Thread Xiangrong Fang
> Also widestrings are not refcounted on the pascal level, but "managed". > > What's the implication of the difference between refcounted vs. "managed"? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listin

Re: [fpc-pascal] about "reference-counted" variables

2013-03-14 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > Is there a "complete" list of reference counted variables in FP? e.g. > dynamic arrays are ref-counted. but are variables allocated by New() > ref-counted? > > Dynamic arrays > AnsiString > UnicodeString (and on non Windows also WideString) > COM styl

Re: [fpc-pascal] Re: Selective Class Helper

2013-03-14 Thread Juha Manninen
On Thu, Mar 14, 2013 at 2:58 AM, Xiangrong Fang wrote: > ... which was a feature I like in C++, although I have never write a program > more complex than cout << "Hello World" in that magnificent language. :-) You consider it "magnificent" because you have not written anything complex with it. Pl

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Mattias Gaertner
On Thu, 14 Mar 2013 07:05:21 +0800 Xiangrong Fang wrote: > Is it possible to use try...except to catch SIGSEGV? yes. The exception class is EAccessViolation. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.

Re: [fpc-pascal] Re: two questions about dynamic array

2013-03-14 Thread Mattias Gaertner
On Wed, 13 Mar 2013 11:32:43 + Howard Page-Clark wrote: > On 13/03/13 9:50, Mattias Gaertner wrote: > > On Wed, 13 Mar 2013 09:35:43 + > > Howard Page-Clark wrote: > > > >> On 12/03/13 8:30, Xiangrong Fang wrote: > >>> TMyClass = class > >>> myarray: array[0..100] of Integer; > >>>

Re: [fpc-pascal] catch segfaults

2013-03-14 Thread Tomas Hajny
On Thu, March 14, 2013 01:48, Xiangrong Fang wrote: > 2013/3/14 Ewald >> Once upon a time, Xiangrong Fang said: >> > Is it possible to use try...except to catch SIGSEGV? >> I don't know if it is possible, but how about using fpSignal()? See >> http://www.freepascal.org/docs-html/rtl/baseunix/fpsig