Re: [fpc-pascal] Get all caller adresses of a procedure/function

2012-08-06 Thread Aleksa Todorovic
On Mon, Aug 6, 2012 at 9:48 PM, Rainer Stratmann wrote: > Am Monday 06 August 2012 21:26:24 schrieb Jonas Maebe: >> It doesn't work like that. Regular calls use relative offsets on most (if >> not all) architectures we support. And in some cases we generate >> position-independent code, so then yo

Re: [fpc-pascal] How to get the offset of a record

2011-04-30 Thread Aleksa Todorovic
On Sat, Apr 30, 2011 at 14:30, Rainer Stratmann wrote: > In Turbopascal it was possible with offs() > > type >  rectype = record >  var1 : longint; >  var2 : longint; >  var3 : boolean; >  end; > > var >  o : longint; >  recvar : rectype; > >  o := offs( recvar.var1 );  // --> 0 >  o := offs( recv

Re: [fpc-pascal] Re: Converting code from C++ to FP....

2011-03-19 Thread Aleksa Todorovic
On Sat, Mar 19, 2011 at 13:03, Bo Berglund wrote: > > Now I have found another very strange construct: > > void ForwardModel::SetMixedBoundaryCondition(const int iElec, >   const double* SX0, >   const double* SY0, >   const double* SZ0, >   double* SX, >   double* SY, >   double* SZ) > > Now it s

Re: [fpc-pascal] Converting code from C++ to FP....

2011-03-19 Thread Aleksa Todorovic
On Sat, Mar 19, 2011 at 06:07, Bo Berglund wrote: > > 1) The second line in the loop contains the command std::max, how can > that be translated? I have not found any class definition for "std" > with a method "max" > There is function Max in unit Math, so you could say: jBegin := Max(k-band

Re: [fpc-pascal] Read-only global references

2011-03-05 Thread Aleksa Todorovic
On Sun, Mar 6, 2011 at 02:14, Marcos Douglas wrote: > On Sat, Mar 5, 2011 at 7:05 PM, Mark Morgan Lloyd > wrote: >> Marcos Douglas wrote: >>> >>> On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd >>> wrote: Where a unit exports an instance of an object, what's best practice for ma

Re: [fpc-pascal] dynamic array contents and system.move

2010-05-05 Thread Aleksa Todorovic
4) keep RTL, FCL and other packages in a good and usable shape; ... Not really nice environment to mess around with such low level functions by adding special cases, isn't it? :-) -- Aleksa Todorovic - Lead Programmer Eipix Entertainment www eipix com

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Aleksa Todorovic
;  * my example to fix the inconsistent syntax for hint directives (deprecated). > > -- > Regards, >  - Graeme - > > > ___ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://opensoft.homeip.net/fpgui/ > ___

Re: [fpc-pascal] Generics problem/question

2010-01-24 Thread Aleksa Todorovic
On Tue, Jan 19, 2010 at 18:35, Aleksa Todorovic wrote: > On Mon, Jan 18, 2010 at 04:07, Aleksa Todorovic wrote: > > One (not very nice) way to have generic list of records is using > macros. I've extracted definition of TFPGList, made it ordinary type, > and did some sear

Re: [fpc-pascal] Generics problem/question

2010-01-19 Thread Aleksa Todorovic
On Mon, Jan 18, 2010 at 04:07, Aleksa Todorovic wrote: > > The proper solution for this problem is not simple. Somehow, you will > have to make operator = (const A, B: TPar) visible inside FGL unit > (because of the way generics are currently implemented), or make > compiler think

Re: [fpc-pascal] Generics problem/question

2010-01-18 Thread Aleksa Todorovic
On Fri, Jan 15, 2010 at 09:00, leledumbo wrote: > > Ah... I can see it now: > > 711  function TFPGList.IndexOf(const Item: T): Integer; > 712  begin > 713    Result := 0; > 714    {$info TODO: fix inlining to work! InternalItems[Result]^} > 715    while (Result < FCount) and (PT(FList)[Result] <>

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Aleksa Todorovic
On Wed, Jan 13, 2010 at 19:13, David Emerson wrote: > > d.2. wrt class methods, can they be virtual? (This strikes me as being > closely related to d.1) > Definitely, yes! (and I believe that was available before class vars/consts) I use this great feature for (de)serialization of messages in my

Re: [fpc-pascal] Is $fpctarget defined on all targets?

2009-12-06 Thread Aleksa Todorovic
On Sun, Dec 6, 2009 at 17:13, Jonas Maebe wrote: > > On 06 Dec 2009, at 17:01, Aleksa Todorovic wrote: > >> I've just started porting an application from Java to FPC (current >> targets are Win32 and Linux). I can successfully compile and run >> initial tests on

[fpc-pascal] Is $fpctarget defined on all targets?

2009-12-06 Thread Aleksa Todorovic
Hi! I've just started porting an application from Java to FPC (current targets are Win32 and Linux). I can successfully compile and run initial tests on both targets. The problem I have is with -FU parameter. When I execute fpc -FUunits/$fpctarget test_client on Windows, it correctly outputs .o,

Re: [fpc-pascal] readonly variables

2009-11-28 Thread Aleksa Todorovic
al maillist  -  fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Aleksa Todorovic - Lead Programmer Eipix Entertainment http://www.eipix.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.

2009-11-18 Thread Aleksa Todorovic
On Wed, Nov 18, 2009 at 17:58, Jonas Maebe wrote: > > What is the problem with fillchar? (other than that it prints a wrong hint in > some cases. > > Also note that the difference between hints and warnings is exactly that > hints are not guaranteed to be 100% correct or relevant in all situatio

Re: [fpc-pascal] How to solve "Conversion between ordinals and pointers is not portable"

2009-11-17 Thread Aleksa Todorovic
On Tue, Nov 17, 2009 at 10:05, Jonas Maebe wrote: > > Replace the PtrUInt types casts with PByte (or Pointer) type casts. > Does that mean that (PByte(p) + N) = (Pointer(p) + N) for pointer-castable p and integer N? ___ fpc-pascal maillist - fpc-pasca

Re: [fpc-pascal] PChar -> AnsiString -> PChar = memory leak?

2009-10-29 Thread Aleksa Todorovic
On Thu, Oct 29, 2009 at 14:00, Graeme Geldenhuys wrote: > Hi, > > Do I create a memory leak if I cast a PChar it a AnsiString. Then > append text to the AnsiString and then cast it back to the original > PChar? > > eg: > var >  Text: Pchar;    <-- global var containing text. > > procedure AppendTe

Re: [fpc-pascal] WORD (2 bytes) to String conversion

2009-10-23 Thread Aleksa Todorovic
___ > fpc-pascal maillist  -  fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Aleksa Todorovic - Lead Programmer Eipix Entertainment http://www.eipix.com/ __

Re: [fpc-pascal] Creating text files with TFileStream

2009-10-23 Thread Aleksa Todorovic
in WriteStr('%s', [s]); end; [written out of head, but it should work] -- Aleksa Todorovic - Lead Programmer Eipix Entertainment http://www.eipix.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

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

2009-10-18 Thread Aleksa Todorovic
On Sun, Oct 18, 2009 at 18:49, Jorge Aldo G. de F. Junior wrote: > Wouldnt a NaN (Not a number) be more "matematically correct" result (I saw > that on an old book about i387) > > Matematically division by zero is an "mathematical impossibility", so NaN > would be more logical > > Is there a way t

Re: [fpc-pascal] Illogical automatic dereferencing

2009-10-13 Thread Aleksa Todorovic
On Mon, Oct 12, 2009 at 22:03, "Vinzent Höfler" wrote: > BTW, the expression "@DynamicArray" should really return the address of the > first element, not the address of the pointer to the array structure. What's wrong with the current solution? "the first element" = DynamicArray[0] "address of

Re: [fpc-pascal] Illogical automatic dereferencing

2009-10-12 Thread Aleksa Todorovic
rrays are during compile time :-) Plus, you get type checking. See? When you really need some feature so much that you start coding it over and over (like dynamic arrays based on pointer to array), it makes sense to improve the language and the compiler. -- Aleksa Todorovic - Lead Programmer Eipix Entertainment http://www.eipix.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] two small ?s - high(real) and nearest 2^x

2009-10-10 Thread Aleksa Todorovic
just need some simple asm coding to use it. > regards, >  Matthias > _______ > fpc-pascal maillist  -  fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Aleksa Todorovic - Lead Programmer E

Re: [fpc-pascal] Illogical automatic dereferencing

2009-10-10 Thread Aleksa Todorovic
___ > fpc-pascal maillist  -  fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Aleksa Todorovic - Lead Programmer Eipix Entertainment http://www.eipix.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] $IF documentation - missing help

2009-09-15 Thread Aleksa Todorovic
and greater. How > do I write this? > > > Regards, >  - Graeme - > > -- > fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal > http://opensoft.homeip.net/fpgui/ > > ___ > fpc-pascal maillist  -  fpc-pa

[fpc-pascal] IE 200307043

2009-05-24 Thread Aleksa Todorovic
Hi, all! I've just tried to compile some of my old Pascal code, and got IE 200307043. I've tried both 2.2.4 and svn trunk versions. Simple program to generate it: program test; var p: Pointer; begin p := nil + 1; end. I couldn't find issue about this in bug tracker, should I report it? Bes

Re: [fpc-pascal] Free Pascal Support for ARM Architecture

2008-12-08 Thread Aleksa Todorovic
So, the situation is like this: 1) Target ARM architecture needs to be "told" to FPC since FPC needs this information to do correct code generation. 2) FPC does not inform GNU assembler of intended ARM architecture for which assembler code is generated for, which doesn't prevent GNU as from gener

Re: [fpc-pascal] Any good Pascal interpreter?

2008-11-04 Thread Aleksa Todorovic
Have you tried PascalScript? http://www.remobjects.com/ps.aspx -- Aleksa Todorovic Lead Programmer Eipix, Game Develoopment Company www.eipix.com On Wed, Nov 5, 2008 at 07:46, leledumbo <[EMAIL PROTECTED]> wrote: > > Better if it supports FPC dialect, too. > -- > Vi

Re: [fpc-pascal] Can I make this with Free Pascal?

2008-09-23 Thread Aleksa Todorovic
On Tue, Sep 23, 2008 at 08:46, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > On Mon, Sep 22, 2008 at 11:38 PM, markweber <[EMAIL PROTECTED]> wrote: >> >> I have thought graphics software needed to deal with video card and so, and >> needed to make very powerful calculations. If you say it's a soft