[fpc-pascal] (no subject)

2009-10-17 Thread ak za
i want to don't send mail to me from you but idn't know how do it. please guide 
me


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

Re: [fpc-pascal] (no subject)

2009-10-17 Thread Micha Nelissen

ak za wrote:
i want to don't send mail to me from you but idn't know how do it. 
please guide me


Do you mean unsubscribe, see link at bottom of this email:


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


Then look at bottom of page, unsubscribe.

Micha


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


Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-17 Thread Vinzent Höfler
Graeme Geldenhuys graemeg.li...@gmail.com:

 Any programmer worth hiring should find it relatively easy to switch
 to another language. Or and least become proficient in it in a
 relative short period of time.  The basic principles apply to all
 languages, it's just the tool-chain and syntax that differs.

Yes and no. The mindsets of the languages may differ. Try talking about typing 
with a C-programmer and with an Ada-programmer and you'll see what I mean.

That's why the question should not be: Which language do you know?, but 
rather What other languages do you know? It tells me more about the mindset 
of the programmer than any previous 10-years experience with $LANGUAGE.

That's why here Pascal-programmers generally have a better reputation than 
C-zealots. In a land where pointers and dynamic memory allocation are (mostly) 
forbidden, C doesn't get you very far. :)


Vinzent.
-- 
Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
http://portal.gmx.net/de/go/dsl02
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-17 Thread Henry Vermaak
2009/10/17 Vinzent Höfler jellyfish.softw...@gmx.net:
 Graeme Geldenhuys graemeg.li...@gmail.com:

 Any programmer worth hiring should find it relatively easy to switch
 to another language. Or and least become proficient in it in a
 relative short period of time.  The basic principles apply to all
 languages, it's just the tool-chain and syntax that differs.

 Yes and no. The mindsets of the languages may differ. Try talking about 
 typing with a C-programmer and with an Ada-programmer and you'll see what I 
 mean.

 That's why the question should not be: Which language do you know?, but 
 rather What other languages do you know? It tells me more about the mindset 
 of the programmer than any previous 10-years experience with $LANGUAGE.

 That's why here Pascal-programmers generally have a better reputation than 
 C-zealots. In a land where pointers and dynamic memory allocation are 
 (mostly) forbidden, C doesn't get you very far. :)


So, moving from C to Pascal, the programmer just need to learn these
techniques, which really doesn't amount to much for an experienced
programmer.

I think Graeme's point was that if you have a good grasp of software
design and programming techniques, you can write good software in
whatever language you choose.  I have seen this in practice, so I
agree to an extent.  Obviously the programming paradigm of the
language you choose will have an influence, so the old saying of
choosing the right tool holds.

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


[fpc-pascal] Division by Zero: EDivByZero and EZeroDivide

2009-10-17 Thread Bart
Hi,

Is there a reason why in fpc both floating point and integer division
by zero raise an EDivByZero exception?

See: http://docwiki.embarcadero.com/VCL/en/SysUtils.EZeroDivide

SysUtils.EZeroDivide exception is raised when an application attempts
to divide a floating-point value by zero.
Note:  Integer divide-by-zero errors raise the SysUtils.EDivByZero exception.

program zerodiv;

{$IFDEF FPC}
{$mode objfpc}{$H+}
{$ENDIF}

uses Sysutils;

var r,x: extended;
i,j: integer;

begin
  i := 0;
  r := 0.0;
  try
write('Integer division by zero: 1 div 0   - ');
j := 1 div i;
writeln(j);
  except
on e: exception do writeln(e.classname);
  end;
  try
write('Float division by zero  : 1.0 / 0.0 - ');
x := 1.0 / r;
writeln(x);
  except
on e: exception do writeln(e.classname);
  end;
end.

Output with Delphi (3.0:
Integer division by zero: 1 div 0   - EDivByZero
Float division by zero  : 1.0 / 0.0 - EZeroDivide

Output with Fpc 2.2.4 (tested on win32 and Linux i386)
Integer division by zero: 1 div 0   - EDivByZero
Float division by zero  : 1.0 / 0.0 - EDivByZero

Is this by design, or should I report it as a bug?
(B.t.w. setting mode to delphi makes no difference)

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


Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-17 Thread Graeme Geldenhuys
On 17/10/2009, Vinzent Hoefler jellyfish.softw...@gmx.net wrote:

 Absolutely. But there's also the catch: With people only knowing C where
  should this knowledge come from?

Documentation.

I have been programming solely in Object Pascal for the last 9 years.
I dab in Java every now and again (but not for any production
software). I also read a lot of C/C++ code which I rewrite into Object
Pascal for whatever reason. So just like me being able to read and
understand languages I don't earn a living in, so should C,C++,Java,C#
etc developers be able to read and understand Object Pascal.

A quick study of some language reference docs and a few examples
should be all you need to get started.

-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-17 Thread Jürgen Hestermann

A quick study of some language reference docs and a few examples
should be all you need to get started.


The general rules are easy to learn. But to be productive you also need 
to know about environments (IDE etc.), available libraries and their 
usage (which already differ between Delphi and Lazarus), bugs (and their 
workarounds) and OS dependencies and maybe even need to have lots of own 
code which you can reuse. So only getting the basics of a language is 
not enough IMO. And then it *does* matter whether you are used to 
program in a certain language (on a certain OS) or not.

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


Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-17 Thread Vinzent Höfler
Graeme Geldenhuys graemeg.li...@gmail.com:

 I have been programming solely in Object Pascal for the last 9 years.
 I dab in Java every now and again (but not for any production
 software). I also read a lot of C/C++ code which I rewrite into Object
 Pascal for whatever reason. So just like me being able to read and
 understand languages I don't earn a living in, so should C,C++,Java,C#
 etc developers be able to read and understand Object Pascal.

They do (sometimes at least). Still they write it as they would do in C.

 A quick study of some language reference docs and a few examples
 should be all you need to get started.

A quick study of the language reference doesn't tell you why types suddenly are 
important. Why visibility isn't global anymore. Why modules are compilation 
units and not include files etc. pp.

Those ideas can be totally new to a C-programmer. - And then they start moaning 
about the awkward syntax of begin and end... ;)

Or, as the old saying is: One can write Fortran in any language.


Vinzent.
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal