Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread J.-c. Chu
Frankly, every new feature will be a mere increase of complexity if you
reject learning about it.

There is a listing, despite not up-to-date, of new language features
since Delphi 7, at http://edn.embarcadero.com/article/34324.  Not all
of them are currently implemented in FPC.  Could you point out which of
them is “nonsense” or “only saves some keystrokes”?


On January 15, 2012, Jürgen Hestermann wrote:
 
 
 Lars schrieb:
 Personally, I'm getting sick of all the new features added to delphi that
 don't add anything meaningful, and just add complexity to the compiler.
 why didn't borland just make people use old borland objects with methods
 instead of new advanced records? Old borland objects are advanced
 records..

 Ticking me off more: why do we even have objects and classes? what is an
 object? what are classes?  I would have preferred if borland would have
 just called old borland objects Extended records from day one. Now we
 have this feature overload in the language and it's becoming more and
 more
 complex of a language (needlessly). Objects, Classes, records.. aren't
 they all the same thing? I don't even personally buy the idea that
 objects
 even exist.. i think they are just extended records. What is an
 object? an
 instance of a class? if so, why did borland call the type definition
 object if it was supposed to be a class? Ugh. Ugly language - it is
 becoming - sorry to say!

   
 I agree wholeheartly with you!!
 
 Lots of nonsense is added that is already available otherwise (or only
 saves some keystrokes).
 In the past Pascal was an easy to learn (still powerfull) language.
 Today the direction goes
 into increased complexity as all the other languages and nobody realy
 understands it anymore
 so programmers code in a suboptimal manner more and more.
 
 Some may say: You don't have to use it. That's true. But I am also no
 longer able to read
 foreign code (i.e. Lazarus program code) because all these strange
 concepts are used there.
 
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
Best Regards,
J.-c. Chu
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Help!!

2012-01-15 Thread Malvin
So far i've managed to do the program quite well, and I was wondering, can
i close the main form (form1) whils opening form2 and not closing the app?
Is there any way that I can do it?
And if i were to make a new 'ID' (on the app), is there any way that i can
write that into my database? What command should i use?

Thanks in advance.

On Mon, Jan 9, 2012 at 10:15 PM, Malvin Viriya malvin...@gmail.com wrote:

 thanks, i'll try using it


 On 1/4/12, Graeme Geldenhuys-2 [via Free Pascal - General]
 ml-node+s1045716n5120203...@n5.nabble.com wrote:
 
 
  On 4 January 2012 12:33, Malvin wrote:
  Is there any other components need installing so that it will connect
  properly other than libmysql.dll,
 
  Under Windows, that should be all that you need. Under Linux you would
  normally need to install the xxx-dev package where xxx is the database
  library (mysql, firebird, postgresql etc).
 
 
  and also i've heard of TMySQL, what is
  that? and is there any other alternatives?
 
  I don't use MySQL at all, so can't really comment on that. I solely
  use Firebird for my commercial work. I also don't use database
  components directly, instead I use tiOPF - an object persistence
  framework which supports multiple database backends. This allows me to
  concentrate on business objects and business logic, and the tiOPF
  framework takes care of the loading, saving and transaction support
  for me. I primarily use the SqlDB database backend (included with FPC)
  via tiOPF, but can easily change to FBLib via a single compiler
  directive change and a recompile too.
 
  tiOPF is also documented on the FPC wiki. Or visit
  http://www.tiopf.com for more details if you want.
 
  --
  Regards,
- Graeme -
 
 
  ___
  fpGUI - a cross-platform Free Pascal GUI toolkit
  http://fpgui.sourceforge.net
  ___
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 
 
  ___
  If you reply to this email, your message will be added to the discussion
  below:
 
 http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5120203.html
 
  To unsubscribe from Help!!, visit
 
 http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5116673code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5146427.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Sven Barth
Am 15.01.2012 00:59 schrieb Lars nore...@z505.com:

 Daniel Gaspary wrote:
  Any special reason to Advanced Records be available only in Delphi Mode
?


 Personally, I'm getting sick of all the new features added to delphi that
 don't add anything meaningful, and just add complexity to the compiler.
 why didn't borland just make people use old borland objects with methods
 instead of new advanced records? Old borland objects are advanced
 records..

Although I don't know why Borland did it that way (and I'm also not that a
big fan of that extension (but I use them)), I can assure you that advanced
records and objects are not the same:
* objects support inheritance and destructors
* advanced records support the declaration of operators inside them
(important for genetics) and variant parts

 Ticking me off more: why do we even have objects and classes? what is an
 object? what are classes?  I would have preferred if borland would have
 just called old borland objects Extended records from day one. Now we
 have this feature overload in the language and it's becoming more and more
 complex of a language (needlessly). Objects, Classes, records.. aren't
 they all the same thing? I don't even personally buy the idea that objects
 even exist.. i think they are just extended records. What is an object? an
 instance of a class? if so, why did borland call the type definition
 object if it was supposed to be a class? Ugh. Ugly language - it is
 becoming - sorry to say!


Objects were introduced in Turbo Pascal. There were no classes yet, only
objects. When they introduced classes they realized that the object concept
wasn't powerful enough, but because of backwards compatibility they decided
not to fix the objects (or adding a compilerswitch for changing the
functionality) but to introduce a new language construct.
The advanced records were AFAIK introduced, because they added them for
Delphi.Net and they wanted to unify the two platforms a bit.

And yes, the word object now has two meanings in case of Pascal:
* the old OOP concept
* an instance of a type of the new concept

I also can assure you that at least in the FPC compiler (advanced) records
and objects are not the same.

A little sidenote at the end: in mode MacPascal types declared as object
are handled like class, because the objects in MacPascal are closer to
Delphi's classes than to TP's objects.

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

Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Daniel Gaspary
On Sun, Jan 15, 2012 at 04:43, J.-c. Chu jc...@acm.org wrote:
 For one thing, class variables, class methods, and class properties are
 subject to visibility controls and inheritance.

 So you can, for example, have a private class variable initialized with
 class constructor (which avoids code in the INITIALIZATION section) and
 accessed via a read-only class property (which is impossible with
 unit-level variables).

Interesting, thank you for share this use case.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Daniel Gaspary
On Sun, Jan 15, 2012 at 11:44, J.-c. Chu jc...@acm.org wrote:
 There is a listing, despite not up-to-date, of new language features
 since Delphi 7, at http://edn.embarcadero.com/article/34324.  Not all
 of them are currently implemented in FPC.

I believe could be really useful to have a grid style in just one page
with compability status.

Is there something similar to this page at fpc wiki ?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] sorting and merging array of records

2012-01-15 Thread Marco van de Voort
In our previous episode, Tomas Hajny said:
 
 Well, I just played with using CHMs with FP IDE under OS/2 and 
 realized that I get a nice immediate SIGSEGV when using the context 
 help with the CHM help files, 

Hopefully fixed. Somehow the documentation generated empty topic titles all of a
sudden
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Marco van de Voort
In our previous episode, J.-c. Chu said:
 Frankly, every new feature will be a mere increase of complexity if you
 reject learning about it.
 
 There is a listing, despite not up-to-date, of new language features
 since Delphi 7, at http://edn.embarcadero.com/article/34324.  Not all
 of them are currently implemented in FPC. 

Which ones aren't? 

 Could you point out which of
 them is ?nonsense? or ?only saves some keystrokes??

Below is a link to a very old discussion of the above article:

http://www.stack.nl/~marcov/delphilater.txt
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread J.-c. Chu
class abstract?

On January 15, 2012, Marco van de Voort wrote:
 Which ones aren't? 

-- 
Best Regards,
J.-c. Chu
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Jürgen Hestermann

J.-c. Chu schrieb:
 Frankly, every new feature will be a mere increase of complexity if you
 reject learning about it.

So how should in your opinion (Object) Pascal look like in say 10 or 15 
years?
If new features are added with the same speed as in the past, it would 
become
a monster that only those who grew up with it (without gap) or who 
invest months
of learning can control.. Every novice would surrender because the 
learning curve

is so steep. It's no surprise that other scipting languages are so popular.
In general they are much easier to learn.

Borland/Embacadero was the driving force behind all these changes and 
FPC had
to follow if it wanted to stay compatible. But Borland added all these 
features
just for one reason: They had to sell new versions of Delphi. Not the 
new users
were the target but the existing (who should upgrade). The new ones are 
(were)
coming anyway because they were forced to (by the existing users). But 
if one
day FPC frees from Delphi then I hope that this annoying feature-creep 
stops.




 There is a listing, despite not up-to-date, of new language features
 since Delphi 7, at http://edn.embarcadero.com/article/34324.  Not all
 of them are currently implemented in FPC.  Could you point out which of
 them is “nonsense” or “only saves some keystrokes”?

I may not be a standard user (but in the end, who is?) but I have never 
used
(nor missed) any of the mentioned concepts, nor collections, nor objects 
nor

classes nor whatever has been added in the last 20 years and I have never
missed any of them. My programs are lightning fast and easy to understand.

The only thing that changed was that the number (and mightiness) of used
libraries. But I can use them all with Pascal concepts that exist since 
Turbo Pascal.


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


Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Sven Barth

On 15.01.2012 16:55, J.-c. Chu wrote:

class abstract?

On January 15, 2012, Marco van de Voort wrote:

Which ones aren't?




Implemented since 2.4.2 or 2.4.4 AFAIK.

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


Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Sven Barth

On 15.01.2012 16:47, Marco van de Voort wrote:

In our previous episode, J.-c. Chu said:

Frankly, every new feature will be a mere increase of complexity if you
reject learning about it.

There is a listing, despite not up-to-date, of new language features
since Delphi 7, athttp://edn.embarcadero.com/article/34324.  Not all
of them are currently implemented in FPC.


Which ones aren't?


They should all be part of FPC now (only if they meant TMyClass = 
record in their operator overloading example though - the example given 
as is is AFAIK not compileable neither by FPC nor by Delphi).


Segards,
Sven

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


Re: [fpc-pascal] installing FPC 2.6.0 on OS/2

2012-01-15 Thread waldo kitty

On 1/14/2012 16:49, Tomas Hajny wrote:

Is there any difference between ppas.cmd created by fp.exe and fpc.exe if
you add option -s to compilation from both?


i can't find a ppas.cmd when i use fp -s and hit F9 or ALT-F9 to compile... it 
still fails with an error linking... i am allowing the dsk file to load the 
files i had open...


here's the ppas.cmd from fpc -s though...

[ fpc-ppas.cmd ]
@echo off
SET THEFILE=satsort
echo Assembling %THEFILE%
h:\fp\2.6.0\bin\os2\as.exe -o satsort.o satsort.s
if errorlevel 1 goto asmend
Del satsort.s
SET THEFILE=satsort.exe
echo Linking %THEFILE%
h:\fp\2.6.0\bin\os2\ld.exe  -o satsort.out @link.res
if errorlevel 1 goto linkend
h:\fp\2.6.0\bin\os2\emxbind.exe -b -s -w  -k256 -h1 -o satsort.exe satsort.out 
-ai -s8

if errorlevel 1 goto linkend
del satsort.out
if errorlevel 1 goto linkend
goto end
:asmend
echo An error occured while assembling %THEFILE%
goto end
:linkend
echo An error occured while linking %THEFILE%
:end
[ end ]


Any difference between link.res file created in the two cases?


yes...

the first thing i note is the fp link.res includes the .\ directory and the fpc 
one does not... indicated with a 1 below...


the second thing i note is the fp link.res messes up the directory we're working 
in for the program.o file being compiled whereas the fpc one doesn't say the 
directory but only the program.o... indicated with a 2 below...



[ fp-link.res ]
1 -L.\
  -LH:\FP\2.6.0\UNITS\OS2\RTL\
  -LH:\FP\2.6.0\UNITS\OS2\zlib\
  -LH:\FP\2.6.0\UNITS\OS2\x11\
  -LH:\FP\2.6.0\UNITS\OS2\unzip\
  -LH:\FP\2.6.0\UNITS\OS2\tcl\
  -LH:\FP\2.6.0\UNITS\OS2\symbolic\
  -LH:\FP\2.6.0\UNITS\OS2\rexx\
  -LH:\FP\2.6.0\UNITS\OS2\regexpr\
  -LH:\FP\2.6.0\UNITS\OS2\paszlib\
  -LH:\FP\2.6.0\UNITS\OS2\pasjpeg\
  -LH:\FP\2.6.0\UNITS\OS2\os2units\
  -LH:\FP\2.6.0\UNITS\OS2\libpng\
  -LH:\FP\2.6.0\UNITS\OS2\libgd\
  -LH:\FP\2.6.0\UNITS\OS2\lexyacc\
  -LH:\FP\2.6.0\UNITS\OS2\imlib\
  -LH:\FP\2.6.0\UNITS\OS2\hermes\
  -LH:\FP\2.6.0\UNITS\OS2\hash\
  -LH:\FP\2.6.0\UNITS\OS2\gtk1\
  -LH:\FP\2.6.0\UNITS\OS2\fv\
  -LH:\FP\2.6.0\UNITS\OS2\fppkg\
  -LH:\FP\2.6.0\UNITS\OS2\fpmkunit\
  -LH:\FP\2.6.0\UNITS\OS2\fpgtk\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-xml\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-res\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-registry\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-process\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-passrc\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-net\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-json\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-js\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-image\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-fpcunit\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-db\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-base\
  -LH:\FP\2.6.0\UNITS\OS2\chm\
  -LH:\FP\2.6.0\UNITS\OS2\bzip2\
  -LH:\FP\2.6.0\UNITS\OS2\
  -LH:\FP\2.6.0\BIN\OS2\
  H:\FP\2.6.0\UNITS\OS2\RTL\prt0.o
2 h:\fpc\projects\satellite\h:\fpc\projects\satellite\satsort.o
  H:\FP\2.6.0\UNITS\OS2\RTL\system.o
  H:\FP\2.6.0\UNITS\OS2\RTL\heaptrc.o
  H:\FP\2.6.0\UNITS\OS2\RTL\sysutils.o
  H:\FP\2.6.0\UNITS\OS2\RTL\strutils.o
  H:\FP\2.6.0\UNITS\OS2\RTL\objects.o
  H:\FP\2.6.0\UNITS\OS2\RTL\math.o
  H:\FP\2.6.0\UNITS\OS2\RTL\crt.o
  H:\FP\2.6.0\UNITS\OS2\RTL\dos.o
  H:\FP\2.6.0\UNITS\OS2\RTL\objpas.o
  H:\FP\2.6.0\UNITS\OS2\RTL\sysconst.o
  H:\FP\2.6.0\UNITS\OS2\RTL\doscalls.o
  H:\FP\2.6.0\UNITS\OS2\RTL\strings.o
  H:\FP\2.6.0\UNITS\OS2\RTL\system.a
  H:\FP\2.6.0\UNITS\OS2\RTL\crt.a
  H:\FP\2.6.0\UNITS\OS2\RTL\doscalls.a
[ fp-link.res ends ]

[ fpc-link.res ]
  -LH:\FP\2.6.0\UNITS\OS2\RTL\
  -LH:\FP\2.6.0\UNITS\OS2\zlib\
  -LH:\FP\2.6.0\UNITS\OS2\x11\
  -LH:\FP\2.6.0\UNITS\OS2\unzip\
  -LH:\FP\2.6.0\UNITS\OS2\tcl\
  -LH:\FP\2.6.0\UNITS\OS2\symbolic\
  -LH:\FP\2.6.0\UNITS\OS2\rexx\
  -LH:\FP\2.6.0\UNITS\OS2\regexpr\
  -LH:\FP\2.6.0\UNITS\OS2\paszlib\
  -LH:\FP\2.6.0\UNITS\OS2\pasjpeg\
  -LH:\FP\2.6.0\UNITS\OS2\os2units\
  -LH:\FP\2.6.0\UNITS\OS2\libpng\
  -LH:\FP\2.6.0\UNITS\OS2\libgd\
  -LH:\FP\2.6.0\UNITS\OS2\lexyacc\
  -LH:\FP\2.6.0\UNITS\OS2\imlib\
  -LH:\FP\2.6.0\UNITS\OS2\hermes\
  -LH:\FP\2.6.0\UNITS\OS2\hash\
  -LH:\FP\2.6.0\UNITS\OS2\gtk1\
  -LH:\FP\2.6.0\UNITS\OS2\fv\
  -LH:\FP\2.6.0\UNITS\OS2\fppkg\
  -LH:\FP\2.6.0\UNITS\OS2\fpmkunit\
  -LH:\FP\2.6.0\UNITS\OS2\fpgtk\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-xml\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-res\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-registry\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-process\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-passrc\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-net\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-json\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-js\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-image\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-fpcunit\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-db\
  -LH:\FP\2.6.0\UNITS\OS2\fcl-base\
  -LH:\FP\2.6.0\UNITS\OS2\chm\
  -LH:\FP\2.6.0\UNITS\OS2\bzip2\
  -LH:\FP\2.6.0\UNITS\OS2\
  -LH:\FP\2.6.0\BIN\OS2\
  H:\FP\2.6.0\UNITS\OS2\RTL\prt0.o
2 satsort.o
  H:\FP\2.6.0\UNITS\OS2\RTL\system.o
  H:\FP\2.6.0\UNITS\OS2\RTL\heaptrc.o
  H:\FP\2.6.0\UNITS\OS2\RTL\sysutils.o
  H:\FP\2.6.0\UNITS\OS2\RTL\strutils.o
  H:\FP\2.6.0\UNITS\OS2\RTL\objects.o
  

Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Jetcheng Chu
I’m not brave enough to predict what Pascal is going to look like in a
decade.  It’s true that features should not be added promiscuously, but
I don’t think Delphi is a fair target of blame.

Let’s again have a look at the table in
http://edn.embarcadero.com/article/34324.  Basically we can group
those features as follows.

1.  Catching up with other langauges: operator overloading.

Operator overloading makes certain code more readable.

2.  Finer scoping and encapsulation: class-local types, variables,
constants, and properties; “advanced” record syntax; STRICT
visibilities; STATIC CLASS methods; class helpers; CLASS ABSTRACT;
CLASS SEALED; and FINAL methods.

These really are refinements of long-existed concepts, which cannot
be elegantly reduced to pre-existing constructs.

3.  Misc: routine inlining; FOR–IN loops.

The FOR–IN loop is the only thing that I personally find
objectionable; that’s one in 17 (according to the table in the
article).

There is no substantially new concepts.  None of them are difficult to
understand, certainly not requiring “months of learning”.  And if you
need some help, a simple Google query with “site:embarcadero.com” will
almost do the job.

I understand that for someone who’s been avoiding OOP in the past 20
years these new features may be annoying.  But in the meantime there are
people who grew up with object-oriented languages, and they might
welcome these changes.


On January 16, 2012, Jürgen Hestermann wrote:
 J.-c. Chu schrieb:
 Frankly, every new feature will be a mere increase of complexity if you
 reject learning about it.
 
 So how should in your opinion (Object) Pascal look like in say 10 or 15
 years?
 If new features are added with the same speed as in the past, it would
 become
 a monster that only those who grew up with it (without gap) or who
 invest months
 of learning can control.. Every novice would surrender because the
 learning curve
 is so steep. It's no surprise that other scipting languages are so popular.
 In general they are much easier to learn.
 
 Borland/Embacadero was the driving force behind all these changes and
 FPC had
 to follow if it wanted to stay compatible. But Borland added all these
 features
 just for one reason: They had to sell new versions of Delphi. Not the
 new users
 were the target but the existing (who should upgrade). The new ones are
 (were)
 coming anyway because they were forced to (by the existing users). But
 if one
 day FPC frees from Delphi then I hope that this annoying feature-creep
 stops.
 
 
 
 There is a listing, despite not up-to-date, of new language features
 since Delphi 7, at http://edn.embarcadero.com/article/34324.  Not all
 of them are currently implemented in FPC.  Could you point out which of
 them is “nonsense” or “only saves some keystrokes”?
 
 I may not be a standard user (but in the end, who is?) but I have never
 used
 (nor missed) any of the mentioned concepts, nor collections, nor objects
 nor
 classes nor whatever has been added in the last 20 years and I have never
 missed any of them. My programs are lightning fast and easy to understand.
 
 The only thing that changed was that the number (and mightiness) of used
 libraries. But I can use them all with Pascal concepts that exist since
 Turbo Pascal.
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
Jetcheng Chu
http://people.rerouted.org/jcchu
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread J.-c. Chu
The attached file does not compile in my trunk-version compiler.

On January 16, 2012, Sven Barth wrote:
 On 15.01.2012 16:55, J.-c. Chu wrote:
 class abstract?

 On January 15, 2012, Marco van de Voort wrote:
 Which ones aren't?

 
 Implemented since 2.4.2 or 2.4.4 AFAIK.
 
 Regards,
 Sven
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
Best Regards,
J.-c. Chu
{$MODE delphi}

type
  TTestClass = class abstract
procedure TestMethod;
  end;

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

Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-15 Thread Marco van de Voort
In our previous episode, J.-c. Chu said:
 The attached file does not compile in my trunk-version compiler.

As Sven already said, that example doesn't compile in Delphi either.

Embarcadero Delphi for Win32 compiler version 22.0
Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
xxx.dpr(8)
xxx.dpr(3) Error: E2065 Unsatisfied forward or external declaration:
'TTestClass.TestMethod'
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] installing FPC 2.6.0 on OS/2

2012-01-15 Thread Tomas Hajny
On 15 Jan 12, at 13:31, waldo kitty wrote:
 On 1/14/2012 16:49, Tomas Hajny wrote:
 .
 .
  Any difference between link.res file created in the two cases?
 
 yes...
 
 the first thing i note is the fp link.res includes the .\ directory and the 
 fpc 
 one does not... indicated with a 1 below...

I don't know why they are different, but this probably shouldn't be a 
problem.


 the second thing i note is the fp link.res messes up the directory we're 
 working 
 in for the program.o file being compiled whereas the fpc one doesn't say the 
 directory but only the program.o... indicated with a 2 below...
 .
 .
 2 h:\fpc\projects\satellite\h:\fpc\projects\satellite\satsort.o
 .
 .

This obviously is the problem - the linker cannot find the object 
file this way. :-((( I can reproduce it, but finding time for 
debugging it and fixing it will probably take some time (mostly due 
to time constraints on my side :-( ). Fortunately, the workaround of 
using the command line compiler works well so this shouldn't be a 
show-stopper (although it certainly isn't pleasant :-( ).

Thanks for letting me know about it. I suggest that you file a 
standard bug report (not that I expect anyone else to fix it if the 
problem is restricted to the OS/2 version, but it becomes visible for 
other users who may come across the problem too this way at least).

Tomas

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


Re: [fpc-pascal] installing FPC 2.6.0 on OS/2

2012-01-15 Thread waldo kitty

On 1/15/2012 17:17, Tomas Hajny wrote:

On 15 Jan 12, at 13:31, waldo kitty wrote:

On 1/14/2012 16:49, Tomas Hajny wrote:

Any difference between link.res file created in the two cases?


yes...

the first thing i note is the fp link.res includes the .\ directory and the fpc
one does not... indicated with a 1 below...


I don't know why they are different, but this probably shouldn't be a
problem.


i didn't think so, either... i mean, it would seem that fpc looks in the current 
directory already... as such, it doesn't list the .\ directory in its list... fp 
seems to need this additional assistance, maybe? ;)



the second thing i note is the fp link.res messes up the directory we're working
in for the program.o file being compiled whereas the fpc one doesn't say the
directory but only the program.o... indicated with a 2 below...

  .

2 h:\fpc\projects\satellite\h:\fpc\projects\satellite\satsort.o

  .

This obviously is the problem - the linker cannot find the object
file this way. :-((( I can reproduce it,


i suspected that was the problem once i knew where to look... i'm glad you could 
reproduce it, too ;)



but finding time for debugging it and fixing it will probably take some
time (mostly due to time constraints on my side :-( ).


i know how that is... i'm the maintainer of an add-on package for a popular 
firewall product and i haven't much time to work on that, recently, either :/



Fortunately, the workaround of using the command line compiler works well
so this shouldn't be a show-stopper (although it certainly isn't pleasant :-( ).


yeah, 'about that :LOL: ah'ma gunna haf tah look at sumptin' tah see how tah 
tell fpc what ah wan' it tah do... like ah have set up in fp when compiling with 
the different modes :LOL


last time i did that was with TP/BP 67 and that was a looong time ago ;)


Thanks for letting me know about it. I suggest that you file a
standard bug report (not that I expect anyone else to fix it if the
problem is restricted to the OS/2 version, but it becomes visible for
other users who may come across the problem too this way at least).


you are welcome... i will /try/ to do a bug report but i'm not sure where... 
i've done a few reports on these automated systems but, ha!, they still tend to 
confound me at times :P


/me adds make a bug report to the LOTTD (List Of Things To Do) and waddles off 
to try to figure out how to add an internal svn server to his small herd of 
boxen... :byebye:


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


[fpc-pascal] Re: Help!!

2012-01-15 Thread Malvin
thanks for your information

On 1/15/12, Mattias Gaertner [via Free Pascal - General]
ml-node+s1045716n5146438...@n5.nabble.com wrote:


 On Sun, 15 Jan 2012 05:58:21 -0800 (PST)
 Malvin malvin...@gmail.com wrote:

 So far i've managed to do the program quite well, and I was wondering, can
 i close the main form (form1) whils opening form2 and not closing the app?
 Is there any way that I can do it?

 If you mean LCL forms: The MainForm can not be closed, but you can hide
 it.

 And if i were to make a new 'ID' (on the app), is there any way that i can
 write that into my database? What command should i use?

 I don't know.


 Thanks in advance.

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


 ___
 If you reply to this email, your message will be added to the discussion
 below:
 http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5146438.html

 To unsubscribe from Help!!, visit
 http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5116673code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==


--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5147410.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] installing FPC 2.6.0 on OS/2

2012-01-15 Thread Tomas Hajny
On Sun, January 15, 2012 23:43, waldo kitty wrote:
 .
 .
 i didn't think so, either... i mean, it would seem that fpc looks in the
 current
 directory already... as such, it doesn't list the .\ directory in its
 list... fp
 seems to need this additional assistance, maybe? ;)

link.res is only used by the linker (invoked from both fpc and fp
equally). Neither fpc nor fp use it themselves.


 .
 .
 Thanks for letting me know about it. I suggest that you file a
 standard bug report (not that I expect anyone else to fix it if the
 problem is restricted to the OS/2 version, but it becomes visible for
 other users who may come across the problem too this way at least).

 you are welcome... i will /try/ to do a bug report but i'm not sure
 where...
 i've done a few reports on these automated systems but, ha!, they still
 tend to
 confound me at times :P

http://bugs.freepascal.org

Tomas


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


[fpc-pascal] convert epoch to UTC

2012-01-15 Thread waldo kitty


i'm needing to convert a UTC epoch date to a standard time string... by 
that, i mean that i want to get something like 2011-01-13 22:24:04 out of the 
epoch number 12013.9338171...


the above epoch number is (supposedly) built like this...

12 == 2012
013 == 13th day of the year
.9338171 * 24 == 22.4116104 hours
.4114104 * 60 == 24.696624 minutes

and here's where it breaks on me because

.696624 * 60 == 41.79744 seconds and that doesn't match the above time string 
showing 04 seconds... that time string was built from this epoch number (by 
another program) and i assume that it followed this published formula for this 
format (which is for satellite TLEs)...


so, my question is this... is there an existing FPC routine that will convert 
this (or a part of this) properly or do i need to play with something to get it 
right? it is obvious that this is not a unix epoch... i'm not sure how 
normal julian date epochs are represented...


i've looked through the docs on freepascal.org but none of them show an number 
with which to compare... there's no links pointing to a definition or example of 
a julian date or unix date or any such...


help! please :/

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


Re: [fpc-pascal] installing FPC 2.6.0 on OS/2

2012-01-15 Thread waldo kitty

On 1/15/2012 18:41, Tomas Hajny wrote:

On Sun, January 15, 2012 23:43, waldo kitty wrote:

Thanks for letting me know about it. I suggest that you file a
standard bug report (not that I expect anyone else to fix it if the
problem is restricted to the OS/2 version, but it becomes visible for
other users who may come across the problem too this way at least).


you are welcome... i will /try/ to do a bug report but i'm not sure
where... i've done a few reports on these automated systems but, ha!,
they still tend to confound me at times :P


http://bugs.freepascal.org


if we're lucky, it would be this one

http://bugs.freepascal.org/view.php?id=21100

i say lucky because i had to dance some rough hoops to get logged in... that was 
ugly because i already have/had an account on the wiki where i'd made some edits 
in the past few years... dunno what weird things were going on but it was not a 
pretty dance to dance :/


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


Re: [fpc-pascal] Postscriptcanvas

2012-01-15 Thread Felipe Monteiro de Carvalho
On Fri, Jan 13, 2012 at 3:31 PM, David Copeland
david.copel...@jsidata.ca wrote:
 Is it possible to use the PostScriptCanvas unit in a non-gui program?

For drawing or for printing?

-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal