Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Graeme Geldenhuys
On Sun, Apr 5, 2009 at 6:15 AM, Richard Ward wrote: > --- This is a good idea. I would go further and suggest that some of the > wiki pages be reorganized to make them easier to navigate and find things. Here are some of the reason's I hate wiki's. * You must edit pages while online. Not eve

Re: [fpc-pascal] Syntax problem with first unit

2009-04-04 Thread Mehmet Erol Sanliturk
Francisco Reyes wrote: Trying my first unit and getting an error I can't figure out. --- unit unit debugprint; Interface function DebugPrint(ProgLevel, CallLevel:integer; MessageIn: string):string; Implementation function DebugPrint(ProgLevel, CallLevel:integer; MessageIn: string):string;

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Richard Ward
Francisco Reyes writes : (snipped) >>The sample code in the ref document doesn't document the simplest case, but goes over what I think is a more complex example of a unit that uses another unit. It also doesn't have any actual code to do anything, so it is kind of an abstract example . I

[fpc-pascal] Syntax problem with first unit

2009-04-04 Thread Francisco Reyes
Trying my first unit and getting an error I can't figure out. --- unit unit debugprint; Interface function DebugPrint(ProgLevel, CallLevel:integer; MessageIn: string):string; Implementation function DebugPrint(ProgLevel, CallLevel:integer; MessageIn: string):string; begin if ProgLevel>=

[fpc-pascal] Remove unused functions in a class

2009-04-04 Thread JoshyFun
Hello FPC-Pascal, If a virtual method of a class is not used at all in the programm will the compiler remove it from the executable ? I think that unused constants and functions will be removed by the compiler or the linker but the methdos of a class... :-? -- Best regards, JoshyFun _

[fpc-pascal] Diego Antonio Lucena Pumar

2009-04-04 Thread Diego Antonio Lucena Pumar
Estimated programmers: What is the diferent between the art and hand made program? In my opinion don't have diferent. The code is poetry, this the expresion of new problematic existencially. What is really problem? I think than the problem resist on properly idea, or concept about supose the ac

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Graeme Geldenhuys
On Sat, Apr 4, 2009 at 7:12 PM, Mattias Gaertner wrote: > > A lazarus package helps to > - write documentation for it, > - handle translations, > - simplifying integrating it into programs with different > compiler settings Plus - Allows for much easier code reuse - applies compiler paths and u

Re: [fpc-pascal] Compiler raise an EAbort exception

2009-04-04 Thread ik
Jonas, I can't reproduce it with a stand alone test (made many attempts). I can however place my original unit, because it is a LGPL unit I'm creating in the bug report, and see what is wrong there. Will it be ok to do that in the bug report ? Thanks, Ido On Sat, Apr 4, 2009 at 4:15 PM, Jonas

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Pete Cervasio
On Saturday 04 April 2009 11:40:03 Francisco Reyes wrote: > > I guess I could try one unit at a time until I find a simple one, but I > figure if anyone knows of a simple unit that may be easy to read, that may > be a better starting point. Here's a simple unit that may help. I have occasion to a

Re: [fpc-pascal] Memory Size

2009-04-04 Thread Markus Glugla
Hi, Am Freitag, den 03.04.2009, 12:39 +0200 schrieb Marco van de Voort: > As Jonas said you first have to define that value in a multitasking > environment. Ok, I have allocate the memory at the program start and it runs fine. It is quick enough yet with memory swaping. But, if I allocate 2GB me

Re: [fpc-pascal] Contributed units section

2009-04-04 Thread Michael Schneider
Am Samstag, 4. April 2009 18:52:44 schrieb Francisco Reyes: > Any other place to look for free pascal libraries/units? maybe http://www.pasports.org/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listin

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Mattias Gaertner
On Sat, 04 Apr 2009 12:56:51 -0400 Francisco Reyes wrote: > Michael Van Canneyt writes: > > > I'll add more examples. > > Thanks. > I will also go over the existing unit documentation and send you some > thoughts and suggestions from a newbie's point of view. Often what is > clear to an experi

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Mattias Gaertner
On Sat, 04 Apr 2009 12:28:18 -0400 Francisco Reyes wrote: > Mattias Gaertner writes: > > > Units is the right way. > > And even better: create a lazarus package for the new units. > > Most of what I do is CLI, have not even installed lazarus. Lazarus is an IDE for any kind of FPC program. You

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Francisco Reyes
Michael Van Canneyt writes: I'll add more examples. Thanks. I will also go over the existing unit documentation and send you some thoughts and suggestions from a newbie's point of view. Often what is clear to an experienced developer is not so clear for a newcomer. All Free Pascal sources

[fpc-pascal] Contributed units section

2009-04-04 Thread Francisco Reyes
I am finding many contributed units with broken links to both the code and the homepage URL. A few thoughts. We could clean all entries to which both the code and the refering URL are broken. We could email the author and give them a week or two, but if we get no replies then we should remove

Re: [fpc-pascal] Generating code form xmi files

2009-04-04 Thread Michael Van Canneyt
On Sat, 4 Apr 2009, Marc Santhoff wrote: > Am Freitag, den 03.04.2009, 11:24 +0200 schrieb Graeme Geldenhuys: > > > I currently use "Dia Diagram editor" to design UML diagrams, but as > > far as I know it does generate any code. :-( > > http://dia2code.sourceforge.net/ Again no pascal :( Mi

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Michael Van Canneyt
On Sat, 4 Apr 2009, Francisco Reyes wrote: > Michael Van Canneyt writes: > > > What is not clear ? > > For starters I don't really follow the diagrams in the ref document. It > probably is some type of formal definition, but I am neither familiar with it, > nor seem to get it. Even when I look

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Francisco Reyes
Michael Van Canneyt writes: What is not clear ? For starters I don't really follow the diagrams in the ref document. It probably is some type of formal definition, but I am neither familiar with it, nor seem to get it. Even when I look at a simpler case like procedure declaration I can't fo

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Francisco Reyes
Mattias Gaertner writes: Units is the right way. And even better: create a lazarus package for the new units. Most of what I do is CLI, have not even installed lazarus. Could someone doing CLI use a lazarus package? What advantage of doing a lazarus package over just making it a unit? Right

Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Michael Van Canneyt
On Sat, 4 Apr 2009, Francisco Reyes wrote: > Could anyone share sample code for a unit? > Looking at the ref.pdf I don't really follow it. > The examples included are not meaningful to this pascal newbie. :-( What is not clear ? > > Alternative any unit package on the site that may be a good

Re: [fpc-pascal] Generating code form xmi files

2009-04-04 Thread Marc Santhoff
Am Freitag, den 03.04.2009, 11:24 +0200 schrieb Graeme Geldenhuys: > I currently use "Dia Diagram editor" to design UML diagrams, but as > far as I know it does generate any code. :-( http://dia2code.sourceforge.net/ -- Marc Santhoff ___ fpc-pascal

Re: [fpc-pascal] Best method for code reuse?

2009-04-04 Thread Mattias Gaertner
On Sat, 04 Apr 2009 12:10:30 -0400 Francisco Reyes wrote: > What are my options for code reuse? > Creating units for common code? > Any other method? Units is the right way. And even better: create a lazarus package for the new units. Mattias ___ fpc-

[fpc-pascal] Sample unit code

2009-04-04 Thread Francisco Reyes
Could anyone share sample code for a unit? Looking at the ref.pdf I don't really follow it. The examples included are not meaningful to this pascal newbie. :-( Alternative any unit package on the site that may be a good example would be just as great. As I work on a small program I find parts

[fpc-pascal] Best method for code reuse?

2009-04-04 Thread Francisco Reyes
What are my options for code reuse? Creating units for common code? Any other method? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Compiler raise an EAbort exception

2009-04-04 Thread JoshyFun
Hello ik, Saturday, April 4, 2009, 3:07:58 PM, you wrote: i> SetLength(Prefix, High(aPrefix)); i> SetLength(NumberLength, High(aNumberLength)); Discarding the compiler crash, this code seems buggy to me, unless you know exactly the high/low of the arrays matches its length, I think it

Re: [fpc-pascal] Compiler raise an EAbort exception

2009-04-04 Thread Jonas Maebe
On 04 Apr 2009, at 15:07, ik wrote: Am I doing here something wrong (I think I can do better with coping between open and dynamic array) ? An unhandled exception in the compiler is always a compiler bug. Please submit a bug report with a compilable example that demonstrates the problem.

[fpc-pascal] Compiler raise an EAbort exception

2009-04-04 Thread ik
Hello, I'm using FPC from Arch Liunx. I'm trying to do the following code: ... TNumberValidationRecord = record Name: String; CreditType : CreditCardType; Prefix : TCre

Re: [fpc-pascal] Constructors & Destructors 101

2009-04-04 Thread Bart
On 4/3/09, Doug Chamberlin wrote: > Essentially, yes. > > However, you may create subtle, lurking bugs if you omit that call and > later refactor your code. For example, if you later change > > type > TFoo = class > > to > > type > TFoo = class(TSomeClass) > > and TSomeClass has so