Bisma Jayadi | 1 Sep 2006 05:12
Picon
Favicon

Delphi collaborates FPC?

http://blogs.borland.com/nickhodges/archive/2006/08/26/27022.aspx#FeedBack

What do you think? :)

-Bee-

has Bee.ography at:
http://beeography.wordpress.com
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Carsten Bager | 1 Sep 2006 11:40
Picon

Re: Ansi strings

> Hi,
> 
> sorry, I cannot answer your question, but may I as:
> 
> 
> Am Donnerstag, den 31.08.2006, 13:13 +0200 schrieb Carsten Bager:
> 
> > I am using the compiler on an embedded Arm 7 platform and Ansi 
> > strings is not an option. 
> 
> How can you do this?

The 2.0.2 supports the ARM processor (for Linux). You can 
download it from the Free Pascal site 
(http://www.freepascal.org/download.html)
If you are interested in embedded programming, I will in short time 
put together a starters kit based on the 2.0.2 compiler. If you are 
interested send a mail (in plain text) to maiser@... with the text
SUBSCRIBE ARM7

When I have the kit ready, I will send a announcement when and 
where you can get the starters kit.

> 
> In fpc 2.0.2 I see no support for ARM CPU, but I am strongly itnerested
> in using this processor, too.
> 
> TIA,
> Marc
> 
(Continue reading)

Michael Van Canneyt | 1 Sep 2006 11:50
Favicon

Re: Ansi strings


On Fri, 1 Sep 2006, Carsten Bager wrote:

>> Hi,
>>
>> sorry, I cannot answer your question, but may I as:
>>
>>
>> Am Donnerstag, den 31.08.2006, 13:13 +0200 schrieb Carsten Bager:
>>
>>> I am using the compiler on an embedded Arm 7 platform and Ansi
>>> strings is not an option.
>>
>> How can you do this?
>
> The 2.0.2 supports the ARM processor (for Linux). You can
> download it from the Free Pascal site
> (http://www.freepascal.org/download.html)
> If you are interested in embedded programming, I will in short time
> put together a starters kit based on the 2.0.2 compiler. If you are
> interested send a mail (in plain text) to maiser@... with the text
> SUBSCRIBE ARM7

Why not use the newly released 2.0.4 compiler? it supports arm too ?

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

(Continue reading)

Rainer Stratmann | 1 Sep 2006 12:03
Picon
Favicon

Re: Delphi collaborates FPC?

Am Freitag, 1. September 2006 05:12 schrieb Bisma Jayadi:
> http://blogs.borland.com/nickhodges/archive/2006/08/26/27022.aspx#FeedBack
>
> What do you think? :)
What is the advantage of the Delphi IDE?
Imo that's the (only?) advantage Delphi has (and faster compilation).

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

Jonas Maebe | 1 Sep 2006 11:50
Picon
Favicon

Re: Ansi strings


On 31 aug 2006, at 13:13, Carsten Bager wrote:

> Here is 2 examples of how the fpc compiler dos when comparing a
> string constant with a pchar . The first is compiled with the 204
> compiler and second one is compiled with the 202 compiler.

The reason we now favour ansistring of shortstring in case of pchars  
is that pchars can be longer than 255 characters. In the particular  
case you mention (comparing a pchar with a constant string < 255  
characters) a shortstring would be possible too, but the type  
conversion code here does not look at the contents of the nodes, only  
a their types.

> I am using the compiler on an embedded Arm 7 platform and Ansi
> strings is not an option.
> I want to force the 204 compiler to use short strings but the only
> option I can se, that have anything to do with strings is the (-Sh use
> ansistrings) and that is just the opposite of what I want.
> Any hints?

You cannot force this other than by explicitly typecasting the pchar  
to shortstring in the comparison.

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

(Continue reading)

Michael Van Canneyt | 1 Sep 2006 11:51
Favicon

Re: Delphi collaborates FPC?


On Fri, 1 Sep 2006, Rainer Stratmann wrote:

> Am Freitag, 1. September 2006 05:12 schrieb Bisma Jayadi:
>> http://blogs.borland.com/nickhodges/archive/2006/08/26/27022.aspx#FeedBack
>>
>> What do you think? :)
> What is the advantage of the Delphi IDE?
> Imo that's the (only?) advantage Delphi has (and faster compilation).

It does not really compile faster. 
In most cases it does link faster, but that will be remedied soon :-)

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

Carsten Bager | 1 Sep 2006 12:00
Picon

Re: Ansi strings

> 
> On 31 aug 2006, at 13:13, Carsten Bager wrote:
> 
> > Here is 2 examples of how the fpc compiler dos when comparing a
> > string constant with a pchar . The first is compiled with the 204
> > compiler and second one is compiled with the 202 compiler.
> 
> The reason we now favour ansistring of shortstring in case of pchars  
> is that pchars can be longer than 255 characters. In the particular  
> case you mention (comparing a pchar with a constant string < 255  
> characters) a shortstring would be possible too, but the type  
> conversion code here does not look at the contents of the nodes, only  
> a their types.
> 
> > I am using the compiler on an embedded Arm 7 platform and Ansi
> > strings is not an option.
> > I want to force the 204 compiler to use short strings but the only
> > option I can se, that have anything to do with strings is the (-Sh use
> > ansistrings) and that is just the opposite of what I want.
> > Any hints?
> 
> You cannot force this other than by explicitly typecasting the pchar  
> to shortstring in the comparison.

I have discovered that I can use the {$LONGSTRINGS OFF} 
directive, is this a god way or should I typecast? It would be nice if 
there were a switch that could be put in the CFG file that forced the 
compiler to use short strings.

> 
(Continue reading)

Rainer Stratmann | 1 Sep 2006 12:20
Picon
Favicon

Re: Delphi collaborates FPC?

Am Freitag, 1. September 2006 11:51 schrieb Michael Van Canneyt:
> On Fri, 1 Sep 2006, Rainer Stratmann wrote:
> > Am Freitag, 1. September 2006 05:12 schrieb Bisma Jayadi:
> >> http://blogs.borland.com/nickhodges/archive/2006/08/26/27022.aspx#FeedBa
> >>ck
> >>
> >> What do you think? :)
> >
> > What is the advantage of the Delphi IDE?
> > Imo that's the (only?) advantage Delphi has (and faster compilation).
>
> It does not really compile faster.
> In most cases it does link faster, but that will be remedied soon :-)
So why not make a commercial Version of it, if it is better?
Then you can concentrate more on your work and the work you like!

Rainer
> Michael.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@...
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Bisma Jayadi | 1 Sep 2006 12:19
Picon
Favicon

flag or exception?

Hi all...

I've always been confused about this subject... flag or exception for error 
handling? Can anyone share knowledges and ideas about when and where and why a 
(pascal) developer should chose one over another?

TIA.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Micha Nelissen | 1 Sep 2006 12:32

Re: flag or exception?

Bisma Jayadi wrote:
> Hi all...
> 
> I've always been confused about this subject... flag or exception for
> error handling? Can anyone share knowledges and ideas about when and
> where and why a (pascal) developer should chose one over another?

Depends on taste, and they have both advantages and disadvantages.

For example, it's easy to see when flag-using code is coded correctly
(are the return values checked and handled?), while it's hard for
exception-using code. Exceptions are usually slower as well. Exceptions
are also not compatible to other languages, usually. OTOH, using
exceptions is lazier/easier. If an error should never occur, then using
exceptions will have more readable code, as not every function calling
this must handle the possible error flag.

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


Gmane