On 06 Apr 2009, at 03:37, Richard Ward wrote:
Where/why would one use a typed constant vs. a variable. i.e.
const
myConst : double = 2.0*Pi;
var
myVar : double = 2.0*Pi;
It seems to me the typed constant is superfluous and can potentially
lead to bugs.
Typed constants pr
Typed constants ARE changeable (just like variables), the only place where
they behave differently from variables is if they're declared in a local
scope (i.e. function / procedure). Typed constants act like a static
variables in C, where it's initialized only once during program execution.
--
Vi
Err... how to use this codegen thing? Do I need to run it over Dia generated
diagrams or what? Sorry, I don't understand Python.
Johann Glaser wrote:
>
> Hi!
>
> Am Sonntag, den 05.04.2009, 11:24 -0300 schrieb Osvaldo Filho:
>> http://www.opensubscriber.com/message/dia-l...@gnome.org/11515637.
Richard Ward writes:
Where/why would one use a typed constant vs. a variable. i.e.
Any time you have a value you want to have in an accessible holder, but want
to ensure you will not change it's value by mistake.
It seems to me the typed constant is superfluous and can potentially
lead
Where/why would one use a typed constant vs. a variable. i.e.
const
myConst : double = 2.0*Pi;
var
myVar : double = 2.0*Pi;
It seems to me the typed constant is superfluous and can potentially
lead to bugs.
___
fpc-pascal maillis
Francisco Reyes wrote:
I was refering to not seeing a note that one can not have a unit
name be the same as a function name. I was never refering to case
sensitivity. Sorry for not been more clear.
---
Ahh, OK. Yes, I've run into that problem myself. The one I
remember was where I
Richard Ward writes:
> I was refering to not seeing a note that one can not
> have a unit name be the same as a function name.
Sure you can, the function just should not reside in the very same unit. This
is a short-coming of the Pascal language definition.
Vinzent.
--
Pt! Schon vom neue
Hi all,
Especially who is interesting in web programming. I saw yesterday Ext
released their first beta for Ext-Core. I think it's the best
candidate to be used as default RTL for PasJS. It's also will ease
PasJS development because lots of things are already provided by this
library, including cr
On Sun, April 5, 2009 17:23, Francisco Reyes wrote:
> Michael Van Canneyt writes:
>
>>> It may help newcomers like myself if this was mentioned on the ref
>>> document.
>>> Just double checked and it does not mention this.
.
.
> In particular it would be helpful if that note (ie name of fuction a
Tomas Hajny wrote:
Note that although having the unit named equally to a function, procedure
or a variable defined within the unit (or elsewhere) is not really
advisable, it is possible, but you need to take scoping rules into account
when trying to access the function, procedure or variable.
Hello Jonas,
Sunday, April 5, 2009, 5:27:02 PM, you wrote:
>> Something like this could kill the dead code detection ? A simple
>> yes/no is enoght :)
JM> Not in case of whole-program optimization:
JM> --- dead.sorg 2009-04-05 17:24:25.0 +0200
JM> +++ dead.s 2009-04-05 17:24:32.
Richard Ward writes:
Interestingly, I was going over the lang ref guide last night and
found that the case sensitivity is mentioned in section 1.3 for
I think from seen this new thread and a few other posts that there is some
confusion.
When I posted my sample code I had the unit name an
On 05 Apr 2009, at 17:12, JoshyFun wrote:
TCustomFoo=class(TObject);
TDerivedFoo=class(TCustomFoo)
procedure Myprocedure(); virtual;
end;
TDeDerivedFoo=class(TDerivedFoo)
procedure MyProcedure(); override;
end;
And in the code:
var
MyObj: TCustomFoo;
begin
MyObj:=TDeDerivedFoo.Create();
TD
Tomas Hajny writes:
Note that although having the unit named equally to a function, procedure
or a variable defined within the unit (or elsewhere) is not really
advisable, it is possible, but you need to take scoping rules into account
Thanks for the note. I wasn't purposedly trying to do it t
Michael Van Canneyt writes:
It may help newcomers like myself if this was mentioned on the ref document.
Just double checked and it does not mention this.
It most certainly does: see the section on reserved words, first paragraph.
In the ref document? Page10? Section 1.3?
Just looked there a
Hi!
Am Sonntag, den 05.04.2009, 11:24 -0300 schrieb Osvaldo Filho:
> http://www.opensubscriber.com/message/dia-l...@gnome.org/11515637.html
The current version is available at
http://k7103.svn.sourceforge.net/viewvc/k7103/branch/ng/dia-codegen/
Bye
Hansi
___
Hello Jonas,
Sunday, April 5, 2009, 2:09:33 PM, you wrote:
JM> If you have a class hierarchy tbase->tderived1->tderived2 with a
JM> virtual method called "vmethod", and nowhere in the program there is a
JM> call to vmethod, then it is unused. Or if it is only called using
JM> tderived2 instances,
(snipped)
Pascal is case insensitive .
It may help newcomers like myself if this was mentioned on the ref
document. Just double checked and it does not mention this.
---
Interestingly, I was going over the lang ref guide last night and
found that the case sensitivity is mentioned in se
On Sun, 5 Apr 2009, Francisco Reyes wrote:
> Mehmet Erol Sanliturk writes:
>
> > Unit and function names DebugPrint are the same .
> > Pascal is case insensitive . Making their cases different does NOT
> > make them different .
> >
> > Please make them different and retry .
>
> Thanks. That w
On Sun, 2009-04-05 at 10:03 -0400, Francisco Reyes wrote:
> Mehmet Erol Sanliturk writes:
>
> > Unit and function names DebugPrint are the same .
> > Pascal is case insensitive . Making their cases different does NOT
> > make them different .
> >
> > Please make them different and retry .
>
> T
On Sun, April 5, 2009 16:03, Francisco Reyes wrote:
> Mehmet Erol Sanliturk writes:
>
>> Unit and function names DebugPrint are the same .
>> Pascal is case insensitive . Making their cases different does NOT
>> make them different .
>>
>> Please make them different and retry .
>
> Thanks. That wor
http://www.opensubscriber.com/message/dia-l...@gnome.org/11515637.html
Em Dom, 2009-04-05 às 11:05 +0200, Michael Fuchs escreveu:
> Graeme Geldenhuys schrieb:
> > I currently use "Dia Diagram editor" to design UML diagrams, but as
> > far as I know it does generate any code. :-(
>
> Try
> http:
Hi Jonas,
> First of all, you set the global system unit variable
> 'ReturnNilIfGrowHeapFails' to true, so that instead of a run time
> error (or exception) you will simply get nil if a memory allocation
> fails.
This is a very good tip! I have read about 'ReturnNilIfGrowHeapFails'
but I for
Mehmet Erol Sanliturk writes:
Unit and function names DebugPrint are the same .
Pascal is case insensitive . Making their cases different does NOT
make them different .
Please make them different and retry .
Thanks. That worked.
It may help newcomers like myself if this was mentioned on the
On 05 Apr 2009, at 13:28, JoshyFun wrote:
JM> If you use FPC 2.3.1 with whole-program optimization and the
compiler
JM> can prove that it is never callable: yes. See
JM> http://wiki.freepascal.org/Whole_Program_Optimization
JM> for more information. In case this is in relation to the
th
Hello Jonas,
Sunday, April 5, 2009, 11:20:59 AM, you wrote:
JM> If you use FPC 2.3.1 with whole-program optimization and the compiler
JM> can prove that it is never callable: yes. See
JM> http://wiki.freepascal.org/Whole_Program_Optimization
JM> for more information. In case this is in relatio
Jonas Maebe wrote:
If you had two different create constructors (for whatever reason),
might you not also need two different destroy destructors?
No, the default destructor should always free all resources,
regardless of how the class instance was created. Otherwise, it would
also make your c
On 05 Apr 2009, at 00:40, JoshyFun wrote:
If a virtual method of a class is not used at all in the programm will
the compiler remove it from the executable ?
If you use FPC 2.3.1 with whole-program optimization and the compiler
can prove that it is never callable: yes. See http://wiki.freep
On 04 Apr 2009, at 21:47, ik wrote:
I can't reproduce it with a stand alone test (made many attempts).
I can however place my original unit, because it is a LGPL unit I'm
creating
in the bug report, and see what is wrong there.
Will it be ok to do that in the bug report ?
As long as you at
On 04 Apr 2009, at 20:47, Markus Glugla wrote:
But, if I allocate 2GB memory the program crashs with an access
violation. I have read that fpc can handle arrays up to a size of 2GB,
isn't? How great can be an array?
First of all, you set the global system unit variable
'ReturnNilIfGrowHeap
Graeme Geldenhuys schrieb:
> I currently use "Dia Diagram editor" to design UML diagrams, but as
> far as I know it does generate any code. :-(
Try
http://www.uni-ulm.de/~s_mgerla/dia2pas.html
mfg
Michael
___
fpc-pascal maillist - fpc-pascal@lists.f
It seem there is nothing available. If it is confirmed, I'll try to
write something.
I'll have a lot of time because I'm stoping World of Wordcraft :)
Philippe
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/ma
32 matches
Mail list logo