[fpc-pascal] Re: JUNK: fpc-pascal Digest, Vol 60, Issue 11
Richard Jasmin
jasminr at lavabit.com
Tue Jul 7 23:39:09 CEST 2009
How about instead of TPicture, 'Objective images'?
I have everything but PNG support in a image unit, for FPOS.
(don't have zlib suport yet...)
The FCL/RTL kind of layout really hides a lot of useful routines as you
have to dig for them.I find the TP layout works best.This for Linux
distro of FPC, I'm sure OSx and win32/go32 could be adapted, but i write
for linux OS and under ubuntu.I find it gives me more options to work
from and isn't as limited as dos, though you can create 32bit apps for
dos.Linux does obfuscate some things, but I am working to fix
that.*This* close to compiling a current relase of FPOS.(minor syntax
issues in extra units I added)
--Jazz
fpc-pascal-request at lists.freepascal.org wrote:
> Send fpc-pascal mailing list submissions to
> fpc-pascal at lists.freepascal.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> or, via email, send a message with subject or body 'help' to
> fpc-pascal-request at lists.freepascal.org
>
> You can reach the person managing the list at
> fpc-pascal-owner at lists.freepascal.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fpc-pascal digest..."
>
>
> Today's Topics:
>
> 1. Re: TPicture (Graphics unit) (Leonardo M. Ram?)
> 2. Re: Records as properties and Delphi compiler error (Jonas Maebe)
> 3. optimised compiler options for "release" version
> (Graeme Geldenhuys)
> 4. Re: optimised compiler options for "release" version (Bee)
> 5. Re: optimised compiler options for "release" version
> (Graeme Geldenhuys)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 7 Jun 2009 08:03:38 -0700 (PDT)
> From: Leonardo M. Ram? <martinrame at yahoo.com>
> Subject: Re: [fpc-pascal] TPicture (Graphics unit)
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID: <960375.75139.qm at web35601.mail.mud.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
>
> Thanks Graeme, I'll take a look at fpimage unit.
>
> Leonardo M. Ramé
> http://leonardorame.blogspot.com
>
>
> --- On Sun, 6/7/09, Graeme Geldenhuys <graemeg at opensoft.homeip.net> wrote:
>
>
>> From: Graeme Geldenhuys <graemeg at opensoft.homeip.net>
>> Subject: Re: [fpc-pascal] TPicture (Graphics unit)
>> To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
>> Date: Sunday, June 7, 2009, 4:22 AM
>> Leonardo M. Ramé wrote:
>>
>>
>>> in Graphics.pas, but I can't find it in FPC. Is this
>>>
>> class replaced
>>
>>> by a similar one?
>>>
>> I you just want to load and manipulate an image, you should
>> be able to use the fpimage.pp unit included with FPC. I you
>> are looking for the TPicture class specifically, then you
>> will have to use the Lazarus LCL (Lazarus Component Library)
>> which is a clone of the Delphi VCL.
>>
>>
>> Regards,
>> - Graeme -
>>
>> -- ________________________________________________
>> fpGUI - a cross-platform Free Pascal GUI toolkit
>> http://opensoft.homeip.net/fpgui/
>>
>> _______________________________________________
>> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 7 Jun 2009 22:19:47 +0200
> From: Jonas Maebe <jonas.maebe at elis.ugent.be>
> Subject: Re: [fpc-pascal] Records as properties and Delphi compiler
> error
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID: <4D2E0D2C-2CA1-444A-8D6F-C8AE92808B57 at elis.ugent.be>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On 07 Jun 2009, at 10:35, fpclist at silvermono.co.za wrote:
>
>
>> A high level, a class is like a record that has been modified to
>> include
>> functions and procedures. I know that I'm over simplifying thing
>> here, please
>> bare with me.
>>
>
> The difference you skip over is the fundamental reason why one works
> and the other doesn't: a class is a pointer, while a record is a value.
>
>
>> I'm trying to understand the logic employed by the creators of
>> Delphi where
>> they don't allow to write to the fields of a record type property,
>> but if the
>> property points to a class type, then anything goes.
>>
>
> In case of a class, the property returns a pointer (namely the pointer
> to the class instance data), and then you (implicitly) dereference the
> pointer and write data where it points to. In case of a record, the
> property returns a record's value, and then (semantically) you change
> the value of this returned record (not the value of the element of the
> record that the property referred to).
>
> This worked in previous FPC versions because rather than treating the
> result of the property like a function result (which it has to,
> because that's the semantical meaning of a property, so you can
> transparently change them into getters/setters without breaking any
> code), it treated it like a direct field access in case no getter/
> setter existed. So rather than returning a record's value, the
> property returned "a reference to a record".
>
>
>> In the example bellow,
>> where a property is of a class type, both Delphi and FPC compile the
>> code,
>> but there is no guarantee that the object referenced to by the
>> property has
>> been instantiated before the property is used (The programmer must
>> instantiate the TTestProp class within TTestClass prior to any call
>> made to xx
>> the property). IMO, it would be a nice feature if the compiler could
>> be
>> modified to issue a warning in such a case.Again, I'm over
>> simplifying, to
>> the compiler, it would be similar to checking for a variable
>> declaration
>> before the variable is used.
>>
>
> Except that it's about dynamically allocated memory and depends on
> interprocedural control flow graph analysis, which makes it immensely
> more complex.
>
>
>> I thing that the "error" in the way that FPC allows record
>> properties to
>> access the record fields could be handy if retained. Perhaps this
>> feature
>> could be reserved for objfpc mode. What are your thoughts on the
>> matter?
>>
>
> Things will remain the way they are for the reasons explained above.
>
>
> Jonas
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 08 Jun 2009 09:24:32 +0200
> From: Graeme Geldenhuys <graemeg at opensoft.homeip.net>
> Subject: [fpc-pascal] optimised compiler options for "release" version
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID: <4A2CBCB0.7020107 at opensoft.homeip.net>
> Content-Type: text/plain; charset=UTF-8
>
> Hi,
>
> I saw the following options recommended by the ExtPascal project for a
> final "release" build of ones project. Does this really make a
> difference in speed/performance and or executable size? How safe is it
> to deploy such an executable to a wide variety of computers out there.
>
> -O2pPENTIUM4 -CXpPENTIUM4 -XXsi -CfSSE
>
>
> While developing my software I enable the following, and simply though
> that for the final "release" version I'll remove the 'heaptrc' support
> (-gl & -gh) and 'strip' the executable at the end.
>
> -CX -Cr -O1 -gl -gh -XX
>
>
> What is recommended? Stay with the more conservative options of FPC (-O2
> -CX -XX) or the more processor specific optimisations. Please note, that
> I do not know what exactly our clients run, processor wise (AMD or
> Intel, singlecore or multi-core, etc...) I would hope everybody at least
> runs a P4 and up on todays computers.
>
>
> Regards,
> - Graeme -
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 8 Jun 2009 15:46:10 +0700
> From: Bee <bee.ography at gmail.com>
> Subject: Re: [fpc-pascal] optimised compiler options for "release"
> version
> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
> Message-ID:
> <92ba311f0906080146x78c22228jc6c18f79ffe46e1d at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
>
>> How safe is it to deploy such an executable to a wide variety of computers out there.
>>
>
> ExtPascal is more for server side application. You should know where
> it will be deployed and you can set more appropriate options. ;)
>
>
More information about the fpc-pascal
mailing list