Re: [fpc-pascal] Embedded ARM7 and long strings

2013-08-20 Thread Carsten Bager
> Am 24.07.2013 09:07, schrieb Carsten Bager:
> > The {$LONGSTRINGS OFF} directive is given at the beginning of the program, 
> > and that 
> > eliminates any problems with "long strings" using the 2.05 compiler. That 
> > does not seem to 
> > work with the new compiler.
> > 
> > Is there a way around this problem?
> 
> I applied a fix in r25283 which should help you.

I have tested it, and it works. :-)
I will go on with my attempt to get the compiler compiling to  Arm7 embedded.
Carsten
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread waldo kitty

On 8/20/2013 23:16, waldo kitty wrote:

the first thing is what errors? "we" do appreciate your confidence in our
telepathic and remote viewing abilities but some things just cannot be handled
in either of these manners ;)


damned fingers... i didn't get a chance to add the requisite "[humor]" tags 
before the above was sent...


FWIW: in one of my other current lives, as a support person, the above is not so 
much humor...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread waldo kitty

On 8/20/2013 17:11, David Emerson wrote:

I am trying to compile some of the aggpas examples included with lazarus, but I
am getting errors upon errors.


the first thing is what errors? "we" do appreciate your confidence in our 
telepathic and remote viewing abilities but some things just cannot be handled 
in either of these manners ;)


then there are (at least) these questions

1. what OS?
2. what version of FPC?
3. how is your FPC installed? package or from SVN?

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread David Emerson

I have also tried compiling examples against the aggpas sources as
downloaded from the aggpas website, outside lazarus, and again, errors
and more errors.


Start by naming one error.


Thanks very much for your encouragement Matthias!

I managed to resolve everything by moving the $include agg_mode.inc 
statement up above the uses clause -- that include does a delphi mode 
definition, which was necessary before the uses clause.


~David.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread Paul Breneman

On 08/20/2013 04:11 PM, David Emerson wrote:

I am trying to compile some of the aggpas examples included with
lazarus, but I am getting errors upon errors.

I have also tried compiling examples against the aggpas sources as
downloaded from the aggpas website, outside lazarus, and again, errors
and more errors.

Is there a recommended way of compiling, or a source to get these
sources from, where examples just work? I would like to try out this
graphics library but since I am unfamiliar with it, it is not very easy
to debug.

Thanks!
~David



fpGUI has AggPas support:
  http://fpgui.sourceforge.net/

Maybe I should add a simple example to these mini distributions?
  http://turbocontrol.com/easyfpgui.htm

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread Mattias Gaertner
On Tue, 20 Aug 2013 14:11:31 -0700
David Emerson  wrote:

> I am trying to compile some of the aggpas examples included with 
> lazarus, but I am getting errors upon errors.
> 
> I have also tried compiling examples against the aggpas sources as 
> downloaded from the aggpas website, outside lazarus, and again, errors 
> and more errors.

Start by naming one error.

 
> Is there a recommended way of compiling, or a source to get these 
> sources from, where examples just work? I would like to try out this 
> graphics library but since I am unfamiliar with it, it is not very easy 
> to debug.

Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] aggpas examples

2013-08-20 Thread David Emerson
I am trying to compile some of the aggpas examples included with 
lazarus, but I am getting errors upon errors.


I have also tried compiling examples against the aggpas sources as 
downloaded from the aggpas website, outside lazarus, and again, errors 
and more errors.


Is there a recommended way of compiling, or a source to get these 
sources from, where examples just work? I would like to try out this 
graphics library but since I am unfamiliar with it, it is not very easy 
to debug.


Thanks!
~David

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Sven Barth

On 20.08.2013 15:39, Xiangrong Fang wrote:

1)  I didn't notice that my question are related to "modes" of fpc, i.e.
turbo-pascal/delphi/objfpc.If they are different, I would like to
know more details, and I am more interested in objfpc mode, not those
"compatibility" modes.


It has nothing to do with the modes besides the fact that the language 
construct "object" is available in all modes except macpas and that the 
language construct "class" is available in modes ObjFPC, Delphi, 
DelphiUnicode, MacPas (there also available as "object" for 
compatibility) and through the modeswitch "class". But objects and 
classes behave consistently to matter which mode is used.



2) I know override / overload are completely different thing, I am not
trying to compare apple with orange.   Also, I am clear about the
definition of virtual methods and their purpose.  What I need help is to
explain the observations I found with my demo app (which is a bit
different than I expected).  For example, why we need "reintroduce"
while "overload" does the same job and better (it makes both methods
available)?


"reintroduce" allows you to "break" the chain of virtual methods to add 
a new parameter and to hide the old method (for example, because calling 
the inherited method in your child class breaks things or whatever). 
"overload" just allows you to define two (or more) methods with the same 
name that have different parameter lists (result type of functions does 
not matter!). In mode ObjFPC this is normally done automatically while 
in mode Delphi you need to explicitely declare them as "overload".


I hope this cleared things up a bit.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Get 2.6.3 from subverion

2013-08-20 Thread Reinier Olislagers
On 20/08/2013 17:09, Osvaldo Filho wrote:
> How can i get version 2.6.3 with svn?
> 
> Is this in: http://svn.freepascal.org/svn/fpc/branches/fixes_2_6 ?

Yes, that looks good.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Get 2.6.3 from subverion

2013-08-20 Thread Osvaldo Filho
How can i get version 2.6.3 with svn?

Is this in: http://svn.freepascal.org/svn/fpc/branches/fixes_2_6 ?

Thanks.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Xiangrong Fang
Hi Sven,

Thank you for comment :)   I am interested in a high level description of
how these concepts (virtual / reintroduce / overloading) differs and how
they affect programming, and I am currently not running into trouble, just
try to get a better understanding of the language.

I'll explain my question / confusions:

1)  I didn't notice that my question are related to "modes" of fpc, i.e.
turbo-pascal/delphi/objfpc.If they are different, I would like to know
more details, and I am more interested in objfpc mode, not those
"compatibility" modes.

2) I know override / overload are completely different thing, I am not
trying to compare apple with orange.   Also, I am clear about the
definition of virtual methods and their purpose.  What I need help is to
explain the observations I found with my demo app (which is a bit different
than I expected).  For example, why we need "reintroduce" while "overload"
does the same job and better (it makes both methods available)?

Thanks,
Shannon






2013/8/20 Sven Barth 

> Am 20.08.2013 14:39 schrieb "Antonio Fortuny" :
>
> >
> >
> > Le 20/08/2013 14:34, Sven Barth a écrit :
> >>
> >> >>
> >> >> This is not same as the description in:
> http://www.freepascal.org/docs-html/ref/refsu26.html
> >> >>
> >> >> BTW, the above documents are talking about objects, but I am using
> classes, is there any difference here?
> >> >
> >> > Yep: a class is a construct definig a collection of variables,
> properties and methods whilst an object is an instantiated class.
> >>
> >> You are aware that the link mentioned by Xiangrong Fang points to a
> part of the manual about Turbo Pascal style objects which are different in
> a different sense to Delphi style objects/classes?
> >
> > Yes, but as he posts a question in a FPC list I imagine he is looking
> for some general information. He looks not to be in trouble. Lest's wait
> and see
>
> That has nothing to do with FPC list or not. Xiangrong Fang asked about
> two different language features here and you told him something about a
> completely different difference related to one of the two language features.
> Your answer is simply not an answer to his question.
>
> Regards,
> Sven
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Build Lazarus Ide - On "make bigide": lazaruspackageintf.pas(102, 1) Fatal: Internal error 2013081601

2013-08-20 Thread Jonas Maebe


On 20 Aug 2013, at 14:38, Sven Barth wrote:


Am 20.08.2013 13:22 schrieb "Osvaldo Filho" :


"a check", please, what check?


An if-clause inside the compiler was added by the revision mentioned  
by

Flávio which now results in that internalerror.

Did you try to completely rebuild all packages with the updated 2.7.1
compiler?


The Dwarf debug generation uses symbols both as local and as global,  
which is wrong and which is what triggers the check. I'll try to fix  
it tonight.



Jonas___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Sven Barth
Am 20.08.2013 14:39 schrieb "Antonio Fortuny" :
>
>
> Le 20/08/2013 14:34, Sven Barth a écrit :
>>
>> >>
>> >> This is not same as the description in:
http://www.freepascal.org/docs-html/ref/refsu26.html
>> >>
>> >> BTW, the above documents are talking about objects, but I am using
classes, is there any difference here?
>> >
>> > Yep: a class is a construct definig a collection of variables,
properties and methods whilst an object is an instantiated class.
>>
>> You are aware that the link mentioned by Xiangrong Fang points to a part
of the manual about Turbo Pascal style objects which are different in a
different sense to Delphi style objects/classes?
>
> Yes, but as he posts a question in a FPC list I imagine he is looking for
some general information. He looks not to be in trouble. Lest's wait and see

That has nothing to do with FPC list or not. Xiangrong Fang asked about two
different language features here and you told him something about a
completely different difference related to one of the two language features.
Your answer is simply not an answer to his question.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Antonio Fortuny

  
  

Le 20/08/2013 14:34, Sven Barth a
  écrit :


  >>
>> This is not same as the description in: http://www.freepascal.org/docs-html/ref/refsu26.html
>>
>> BTW, the above documents are talking about objects, but
I am using classes, is there any difference here?
>
> Yep: a class is a construct definig a collection of
variables, properties and methods whilst an object is an
instantiated class.
  You are aware that the link mentioned by Xiangrong Fang points
to a part of the manual about Turbo Pascal style objects which
are different in a different sense to Delphi style
objects/classes?

Yes, but as he posts a question in a FPC list I imagine he is
looking for some general information. He looks not to be in trouble.
Lest's wait and see

  Regards,
Sven
  
  
  
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


-- 
  

  
  
  
  
 Antonio
Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
  
  

  

  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Build Lazarus Ide - On "make bigide": lazaruspackageintf.pas(102, 1) Fatal: Internal error 2013081601

2013-08-20 Thread Sven Barth
Am 20.08.2013 13:22 schrieb "Osvaldo Filho" :
>
> "a check", please, what check?

An if-clause inside the compiler was added by the revision mentioned by
Flávio which now results in that internalerror.

Did you try to completely rebuild all packages with the updated 2.7.1
compiler?

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Sven Barth
Am 20.08.2013 09:36 schrieb "Antonio Fortuny" :
>
>
> Le 20/08/2013 07:34, Xiangrong Fang a écrit :
>>
>> Hi Flavio,
>>
>> Your findings confirmed mine, but not telling me why? It seems that the
"virtual" keyword has no use at all!   To confirm this, I just removed the
"inherited" call in TDerived, then re-run the program with or without
"virtual/override", the result is exactly same, i.e. with c2 (declared as
TBase), the following statements ALWAYS calls constructor of TDerived, NOT
TBase:
>>
>> c2 := TDerived.Create;
>> c2 := TBase(TDerived.Create);
>>
>> This is not same as the description in:
http://www.freepascal.org/docs-html/ref/refsu26.html
>>
>> BTW, the above documents are talking about objects, but I am using
classes, is there any difference here?
>
> Yep: a class is a construct definig a collection of variables, properties
and methods whilst an object is an instantiated class.

You are aware that the link mentioned by Xiangrong Fang points to a part of
the manual about Turbo Pascal style objects which are different in a
different sense to Delphi style objects/classes?

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Build Lazarus Ide - On "make bigide": lazaruspackageintf.pas(102, 1) Fatal: Internal error 2013081601

2013-08-20 Thread Osvaldo Filho
"a check", please, what check?


2013/8/20 Flávio Etrusco 

> On Tue, Aug 20, 2013 at 1:54 AM, Osvaldo Filho 
> wrote:
> > Anyone coud help-me?
> >
> > user1@movotcf:~/Documentos/Desenvolvimento/pascal/svn/ex/lazarus1010$
> make
> > bigide
> > make -C packager/registration
> > make[1]: Entrando no diretório
> >
> `/home/user1/Documentos/Desenvolvimento/pascal/svn/ex/lazarus1010/packager/registration'
> > /bin/rm -f ../units/x86_64-linux/fcllaz.ppu
> > /usr/local/bin/ppcx64 -MObjFPC -Scghi -O1 -g -gl -vewnhi -l -Fu.
> > -Fu/usr/local/lib/fpc/2.7.1/units/x86_64-linux/rtl -FE.
> > -FU../units/x86_64-linux -Cg -dx86_64 fcllaz.pas
> > Hint: Start of reading config file /etc/fpc.cfg
> > Hint: End of reading config file /etc/fpc.cfg
> > Free Pascal Compiler version 2.7.1 [2013/08/19] for x86_64
> > Copyright (c) 1993-2013 by Florian Klaempfl and others
> > Target OS: Linux for x86-64
> > Compiling fcllaz.pas
> > Compiling registerfcl.pas
> > Compiling lazaruspackageintf.pas
> > lazaruspackageintf.pas(102,1) Fatal: Internal error 2013081601
> > Fatal: Compilation aborted
> > make[1]: ** [fcllaz.ppu] Erro 1
> > make[1]: Saindo do diretório
> >
> `/home/user1/Documentos/Desenvolvimento/pascal/svn/ex/lazarus1010/packager/registration'
> > make: ** [registration] Erro 2
> > (...)
>
> >From the git log, revision 25266 introduced a check that forces this
> error.
>
> -Flávio
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Flávio Etrusco
On Tue, Aug 20, 2013 at 2:34 AM, Xiangrong Fang  wrote:
> Hi Flavio,
>
> Your findings confirmed mine, but not telling me why?

I don't know why, maybe FPC used to be more strict about the use of
inherited, or the docs are simply wrong.


> It seems that the "virtual" keyword has no use at all!

It does, and the documentation is correct in this respect.


>  To confirm this, I just removed the
> "inherited" call in TDerived, then re-run the program with or without
> "virtual/override", the result is exactly same, i.e. with c2 (declared as
> TBase), the following statements ALWAYS calls constructor of TDerived, NOT
> TBase:
>
> c2 := TDerived.Create;
> c2 := TBase(TDerived.Create);

As I said - or tried to say ;) - in the other post, there won't be a
difference when invoking the constructor on a "class literal"
directly.
The second line will generate the exact same code as the first one;
you're instantiating a TDerived instance then "upcasting" it to TBase.


> This is not same as the description in:
> http://www.freepascal.org/docs-html/ref/refsu26.html

Note this page is about methods and you're using constructors in your example.
I would recommend you first do your tests on method declarations, and
later learn about class references (i.e. "class of" declarations) and
constructors.


> BTW, the above documents are talking about objects, but I am using classes,
> is there any difference here?
>
> Shannon

AFAIU per the first page you sent, you can't shadow/reintroduce a
virtual method in an object; when you redeclare a virtual method it
overrides the base one.

-Flávio
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Understanding virtual methods

2013-08-20 Thread Antonio Fortuny

  
  

Le 20/08/2013 07:34, Xiangrong Fang a
  écrit :


  
Hi Flavio,
  

Your findings confirmed mine, but not telling me why? It
  seems that the "virtual" keyword has no use at all!   To
  confirm this, I just removed the "inherited" call in TDerived,
  then re-run the program with or without "virtual/override",
  the result is exactly same, i.e. with c2 (declared as TBase),
  the following statements ALWAYS calls constructor of TDerived,
  NOT TBase:
  

c2 := TDerived.Create;

c2 := TBase(TDerived.Create);
  

This is not same as the description in: http://www.freepascal.org/docs-html/ref/refsu26.html
  

BTW, the above documents are talking about objects, but I
  am using classes, is there any difference here?

  

Yep: a class is a construct definig a collection of variables,
properties and methods whilst an object is an instantiated class.

TMyClass = class(TSomething)            << this is a
class
public
    constructor Create;
    blabla
end;

var
    obj: TMyClass ;        <<--- this is a declared
oblect which instantiates a class when created (see next line)
...
    Obj := TMyClass .Create;            <<- now the class
TMyClass exists thru the Obj object

In other words, a class is non existent whilst an object falls into
the real world. A class describes, an object makes use of a class
A class is unique bet there can be lots of objects instantiating a
class
These few words help to explain the basic difference even if some
more technical explations couls be needed. AFAIK, all OOP languages
use almost the same terminology

This is why class procedures and functions exist. But this is
another story.

Antonio.

  


Shannon

  
  


-- 
  

  
  
  
  
 Antonio
Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
  
  

  

  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal