Re: [fpc-pascal] Commercial support for Lazarus/FPC

2012-04-21 Thread Sven Barth
On 21.04.2012 12:12, denisgolovan wrote: Hi all I am considering to subscribe to commercial support in FPC/Lazarus, but I don't have a clear picture what actually support is :) I am looking at http://www.lazarussupport.com/lazarus/Support and it is somewhat too abstract. I thought maybe it is

Re: [fpc-pascal] Default font name

2012-04-21 Thread Sven Barth
On 21.04.2012 16:50, Krzysztof wrote: Hi, Most of controls (or canvas) have font name "default". How to get exact name of this font? There is GetFontData(Button1.Font.Handle).Name function but it works on QT widget set and on GTK not. You should ask this on the Lazarus list. Regards, Sven __

Re: [fpc-pascal] RemoveDir: Error: Identifier not found

2012-04-25 Thread Sven Barth
Am 24.04.2012 17:35, schrieb Jürgen Hestermann: If I hit Alt+Up on "RemoveDir" within my program I am moved to D:\Programme\lazarus\fpc\2.6.1\source\rtl\objpas\sysutils\diskh.inc(21,10) with the function header declaration but when doing it again on "RemoveDir" within this file I get: Error: ide

Re: [fpc-pascal] Program without window but messages

2012-04-25 Thread Sven Barth
Am 24.04.2012 18:25, schrieb Jürgen Hestermann: I wanted to write a program that has no window but may show messages to the user. I have lots of such programs written with Virtual Pascal but I am struggling to do the same with Free Pascal/Lazarus. A simple test program would look like this: ---

Re: [fpc-pascal] Program without window but messages

2012-04-25 Thread Sven Barth
On 24.04.2012 18:25, Jürgen Hestermann wrote: I wanted to write a program that has no window but may show messages to the user. I have lots of such programs written with Virtual Pascal but I am struggling to do the same with Free Pascal/Lazarus. A simple test program would look like this: -

Re: [fpc-pascal] Testing existence of a file at compilation time

2012-04-26 Thread Sven Barth
Am 26.04.2012 11:21 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > > Is it possible to test for the existence of a file, directory or package at compilation time, i.e. {$if exists() or similar? > > The specific scenario I'm looking at is where I want to publish a couple of pro

Re: [fpc-pascal] Can it map class type as key?

2012-04-26 Thread Sven Barth
Am 26.04.2012 10:45 schrieb "ZHANG Dao-yuan" <1123mon...@gmail.com>: >> >> program moi; >> {$mode objfpc} >>uses fgl; >>type >>tSI= specialize tFpGMap; >>// tIS= specialize tFpGMap; >> begin >> end. > > > Hi, > I'm trying to use template in fpc 2.6.0. I can map class type as

Re: [fpc-pascal] Compilation progress

2012-04-26 Thread Sven Barth
On 26.04.2012 17:31, OBones wrote: Hello, Is there a way get progress information output by the compiler while building a project? I tried the -vt option, but I can't figure out a way to parse this and get something like current value and max while the lines are output. I also tried to look in t

Re: [fpc-pascal] Internal Error 2010021405 when compiling in Linux

2012-05-02 Thread Sven Barth
is easily reproduced if you copy-paste the type > declaration in a new project with $mode Delphi. > > This matches the bug #19500 which is marked as resolved by Sven Barth > but it seems somehow not to have been fixed in Linux; I don't know if > this is possible. I co

Re: [fpc-pascal] Reversing bit-order of byte

2012-05-03 Thread Sven Barth
On 03.05.2012 10:50, David Butler wrote: If you want to go assembly: function ReverseBits(const Value: LongWord): LongWord; register; assembler; asm BSWAP EAX MOV EDX, EAX AND EAX, 0h SHR EAX, 1 AND EDX, 0h SHL EDX,

Re: [fpc-pascal] TBufDataSet: ApplyUpdates

2012-05-03 Thread Sven Barth
On 03.05.2012 15:40, Marcos Douglas wrote: On Thu, May 3, 2012 at 10:01 AM, LacaK wrote: Marcos Douglas wrote / napísal(a): On Thu, May 3, 2012 at 2:52 AM, LacaK wrote: I saw the TBufDataSet.ApplyUpdates and it calls ApplyRecUpdate. The ApplyRecUpdate just raises an exception... Yes it

Re: [fpc-pascal] Re: 2.6.0 for Solaris? And other questions

2012-05-09 Thread Sven Barth
Am 09.05.2012 20:19, schrieb microc...@zoho.com: There are no binaries provided by my distribution. It's Slackware! But the question was, was it really necessary to use such a recent glibc? It's a matter of what the libc version happens to be on the system that was used to build libgdb, which

Re: [fpc-pascal] FPC + valgrind massif problems

2012-05-10 Thread Sven Barth
Am 11.05.2012 02:40, schrieb Michalis Kamburelis: 2. Is there any other reliable memory profiler for FPC? As you can swap memory manager in Pascal, and FPC can give you a backtrace, I suppose it's quite possible to just write a unit that works between your program and standard memory manager, and

Re: [fpc-pascal] Re: 2.6.0 for Solaris?

2012-05-11 Thread Sven Barth
Am 11.05.2012 11:29, schrieb microc...@zoho.com: On Thu, 10 May 2012 17:14:45 + Mark Morgan Lloyd wrote: You might find the fpc-devel mailing list interesting, although I think that everybody would admit that there is a shortage of documentation for the entrails of the compiler. Thanks, I

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-13 Thread Sven Barth
On 12.05.2012 22:18, Jorge Aldo G. de F. Junior wrote: does TFileStream use the same code as assign ? you could create a TFileStream instance and then use AssignStream to a regular file type and keep on using plain old read/write... not tested here, but could be worth a try... Currently the

Re: [fpc-pascal] Catching math exceptions in a DLL

2012-05-16 Thread Sven Barth
Am 16.05.2012 13:35, schrieb michael.vancann...@wisa.be: On Wed, 16 May 2012, Jonas Maebe wrote: OBones wrote on Wed, 16 May 2012: Using FPC, I'm writing a DLL that exports functions used by a given host process. In order to protect the host process, it is mandatory that all exceptions are

Re: [fpc-pascal] Strange compile error

2012-05-17 Thread Sven Barth
On 17.05.2012 10:11, dhkblas...@zeelandnet.nl wrote: Hi, I have a simple application that uses glut and opencv. However as soon as I add the opencv wrapper unit to the uses clause I get: video.pp(10,1) Fatal: Syntax error, "UNIT" expected but "PROGRAM" found The compiler does not recognize the

Re: [fpc-pascal] Handling with sources and exebutables with different names

2012-05-17 Thread Sven Barth
On 17.05.2012 14:09, luciano de souza wrote: hello all, I am compiling CGI modules with Freepascal in commandline mode. if I do: fpc test.pas the result is "test.exe". But the source name needs to be different from the executable name. For this reason: fpc test.pas -oindex.cgi This command s

Re: [fpc-pascal] Re: Handling with sources and exebutables with different names

2012-05-17 Thread Sven Barth
On 17.05.2012 21:09, luciano de souza wrote: Actually, there are no errors. Using cmd.exe on Windows 7 and FPC 2.6.0, I did: fpc test.pas -oindex.cgi I got test.exe and no errors are raised. But did the compiler write something else? A warning maybe (maybe you need to pass "-vw" to see it)

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Sven Barth
On 18.05.2012 20:38, Zaher Dirkey wrote: Hi, I have 2 objects inherited from the base one T_A = class(TObject); T_B1 = class(T_A); T_B2 = class(T_A); T_B3 = class(T_A); Now if I want to extend T_B1 it is easy to inherit it to T_C1 = class (T_B1) and add many functions to it, but. I want the

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Sven Barth
On 19.05.2012 13:12, Jürgen Hestermann wrote: 3.) Of course, there are lots of places where the file data structures filerec and textrec are used in the code. But in most cases only non-changed record elements are used (so no changes are required) and only seldomly the name is used/changed or the

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-19 Thread Sven Barth
On 19.05.2012 16:28, Zaher Dirkey wrote: On Sat, May 19, 2012 at 2:10 AM, Jorge Aldo G. de F. Junior mailto:jagf...@gmail.com>> wrote: You simply cant do it. Not even multiple inheritance would help you in this case. You will have to extend each class by hand. Multiple inherita

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Sven Barth
On 19.05.2012 17:36, Marco van de Voort wrote: In our previous episode, Sven Barth said: While I can not comment on the changes you listed (though they sound more or less valid) I'm not sure if the *rec records can handle pointers, one probably can't use reference types in them, b

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Sven Barth
On 19.05.2012 18:22, Sven Barth wrote: On 19.05.2012 17:36, Marco van de Voort wrote: In our previous episode, Sven Barth said: While I can not comment on the changes you listed (though they sound more or less valid) I'm not sure if the *rec records can handle pointers, one probably

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Sven Barth
On 19.05.2012 17:47, Jürgen Hestermann wrote: > Also you need to keep in mind that do_open is used by platform independant code > so you would need to change the declarations/handling for all other platforms as well. Yes. It can be a can of worms. ;-) Although, as said: Only very few functions

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Sven Barth
On 19.05.2012 13:12, Jürgen Hestermann wrote: 2.) The Assign routine in \fpc\rtl\inc\file.inc overwrites the whole file data structure with zeros (using fillchar). The name has to be omitted from this action because it is now managed automatically. So Assign needs to be changed to: -

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-19 Thread Sven Barth
On 19.05.2012 18:59, Marco van de Voort wrote: In our previous episode, Sven Barth said: Think what happens if those are simply "cloned". Why shouldn't reference types work in threadvard records? As long as the reference count mechanism does it's work correctly it

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-20 Thread Sven Barth
On 20.05.2012 10:58, Jürgen Hestermann wrote: Sven Barth schrieb: >> Although, as said: Only very few functions realy act on the file name. >> Most use the file handle only (which will not change). > Regarding the filename, yes, but while we're at it we could also c

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-20 Thread Sven Barth
Am 21.05.2012 07:17 schrieb "Jürgen Hestermann" : > > > > Tomas Hajny schrieb: >> >> On Sun, May 20, 2012 14:40, Jürgen Hestermann wrote: >> >>> >>> Move(s[1],TextRec(t).Name,Length(s)); >>> That would be a bug IMO when S is longer than 255 characters. >>> "Move" does no range check. >>> >> >> No,

Re: [fpc-pascal] Re: 2.6.0 for Solaris? And other questions [one resolved]

2012-05-22 Thread Sven Barth
Am 21.05.2012 14:59, schrieb microc...@zoho.com: On Wed, 9 May 2012 17:40:40 +0200 (CEST) "Tomas Hajny" wrote: On Wed, May 9, 2012 16:14, microcode wrote: Another question is on 2.6.0 on Linux. I cannot run the fp ide because I ave glibc 2.9. The error message I get says fp: /lib64/libc.so.6

Re: [fpc-pascal] Debug information

2012-05-27 Thread Sven Barth
On 27.05.2012 14:32, Rainer Stratmann wrote: How to get debug information? There is an error, but only adresses are shown. I put on debugger Information in Lazarus (-g) but can get no further infos when an error occurs (except the adresses). Lazarus 0.9.30 fpc 2.4.2 You also need to enable l

Re: [fpc-pascal] Streaming of Generics

2012-05-29 Thread Sven Barth
Am 29.05.2012 12:24, schrieb Kornel Kisielewicz: On Tue, May 29, 2012 at 10:40 AM, kyan wrote: Ideally, I'd only like to write the streaming mechanism for each set of types (normal, anisstring, dynamic array, objects, interfaced objects) once, and use it for every set of items. However, there's

Re: [fpc-pascal] Re: jvmbackend merge

2012-06-03 Thread Sven Barth
On 03.06.2012 17:48, leledumbo wrote: I tried building the compiler, it passes but I have to do some changes. The make process fails after compiling the compiler ended with some warnings regarding constructing a class with abstract method in compiler/jvm/hlcgcpu.pas. The compiler seems to return

Re: [fpc-pascal] Endiannes & programmer's manual - missing compiler define?

2012-06-05 Thread Sven Barth
Am 05.06.2012 08:02, schrieb Reinier Olislagers: Also, I'm sure there must be functions to convert endianness - at least network byte order (big endian) to host order. I found e.g. Synapse synsock: function ntohs(netshort: word): word; function ntohl(netlong: longword): longword; functio

Re: [fpc-pascal] Unit initialization in dll initialization for arm/WinCE

2012-06-11 Thread Sven Barth
Am 11.06.2012 12:25, schrieb kyan: Does unit initialization in libraries (.dll files) work in arm/WinCE? From the startup code of arm-wince I don't see why it should not work... Somehow it seems that even code placed in the library initialization begin end block isn't executed either. How d

Re: [fpc-pascal] Unit initialization in dll initialization for arm/WinCE

2012-06-12 Thread Sven Barth
Am 12.06.2012 15:20 schrieb "kyan" : > > OK, I apologize. It seems that the problem lies elsewhere. The fact > that library initialization seems to be deferred until you do a > GetProcAddress() confused me. It might't be that Windows (or CE only) initalizes a library only if you use GetProcAddress

Re: [fpc-pascal] Unit initialization in dll initialization for arm/WinCE

2012-06-12 Thread Sven Barth
On 12.06.2012 18:27, Tomas Hajny wrote: On Tue, June 12, 2012 18:04, Sven Barth wrote: Am 12.06.2012 15:20 schrieb "kyan": . . The problem is that function GetModuleName() is stubbed out in WinCE (and Linux): unit SysUtils.inc; function GetModuleName(Module: HMODULE): str

Re: [fpc-pascal] std::map equivalent?

2012-06-13 Thread Sven Barth
Am 13.06.2012 11:36 schrieb "Alexander Shishkin" : > > 12.06.2012 17:38, Xiangrong Fang пишет: >> >> Hi, >> >> Is there a std::map equivalent for free pascal? >> >> Thanks, >> Shannon >> >> -- >> >> >> >> ___ >> fpc-pascal maillist - fpc-pascal@lists.fr

Re: [fpc-pascal] fpmake question

2012-06-14 Thread Sven Barth
On 14.06.2012 17:38, Bernd wrote: I have some questions about fpmake. I cannot find any real examples or helpful explanations about it, so I'm currently experimenting with the incomplete information from the wiki. Currently the best examples seem to be the various fpmake.pp files in $fpcdir/pa

Re: [fpc-pascal] header translation question, 64 bit problem

2012-06-17 Thread Sven Barth
On 17.06.2012 01:02, Bernd wrote: Hi, I am translating parts of the libpurple headers. Now I seem to have a problem with this: typedef enum { PURPLE_PLUGIN_UNKNOWN = -1, /**< Unknown type.*/ PURPLE_PLUGIN_STANDARD = 0, /**< Standard plugin. */ PURPLE_PLUGIN_LOAD

Re: [fpc-pascal] Converting from seconds to TTime: easiest way?

2012-06-20 Thread Sven Barth
Am 20.06.2012 12:16, schrieb Reinier Olislagers: On 20-6-2012 11:53, dhkblas...@zeelandnet.nl wrote: Try MyTTime := HugeNumberOfSecondsInteger / (3600 * 24); Bedankt, Darius. That's indeed shorter and fairly clear... but the advantage of the other way is that I don't need to remember what

Re: [fpc-pascal] Try to debug FastCGI or console app with DB connection in Lazarus

2012-06-23 Thread Sven Barth
Please don't answer to an existing thread with a completely different topic as then you might not receive answers, because users either ignore such messages or think the message is for the given thread (because their threadview is collapsed and they only see that a new message arrived in that t

Re: [fpc-pascal] Windows Phone 8 + pascal

2012-06-24 Thread Sven Barth
On 24.06.2012 15:39, Juha Manninen wrote: *In a CNN news page http://edition.cnn.com/2012/06/20/tech/mobile/windows-phone-8-microsoft/index.html I found* that Windows Phone 8 will support native C code. That means it will support also native pascal code. Does anyone know how is it done in practic

Re: [fpc-pascal] Windows Phone 8 + pascal

2012-06-25 Thread Sven Barth
Am 24.06.2012 22:59 schrieb "Juha Manninen" : > > On Sun, Jun 24, 2012 at 8:57 PM, Sven Barth wrote: >> >> I believe they'll mostly go through the WinRT, which is Microsoft's new API pet project. > > > Thanks. I didn't even know about thi

Re: [fpc-pascal] Windows Phone 8 + pascal

2012-06-25 Thread Sven Barth
Am 25.06.2012 11:12 schrieb : > > > > On Mon, 25 Jun 2012, Sven Barth wrote: > >> Am 24.06.2012 22:59 schrieb "Juha Manninen" : >>> >>> >>> On Sun, Jun 24, 2012 at 8:57 PM, Sven Barth >> >> wrote: >>>> >>>&

Re: [fpc-pascal] Windows Phone 8 + pascal

2012-06-25 Thread Sven Barth
Am 25.06.2012 11:48 schrieb "Marco van de Voort" : > > In our previous episode, Sven Barth said: > > > says that WinRT is a COM-based API and uses a .NET-like metadata format. > > > So it is not native code after all then. I don't know why they advertised

Re: [fpc-pascal] Windows Phone 8 + pascal

2012-06-25 Thread Sven Barth
On 25.06.2012 13:21, michael.vancann...@wisa.be wrote: On Mon, 25 Jun 2012, Sven Barth wrote: it as native. I guess it is faster than .NET code because it is not managed. I thought that .NET allows non-managed code, too. Why does "COM-based + .NET-like metadata" imply that it&#x

Re: [fpc-pascal] Shared libraries and threadvars

2012-06-26 Thread Sven Barth
Am 26.06.2012 14:02 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > > I'm currently tinkering with shared libraries, using cmem, mainly on Linux. In one case the main-program code is multithreaded, but so far I'm not moving data between threads inside the library. > > Am I corr

Re: [fpc-pascal] Shared libraries and threadvars

2012-06-26 Thread Sven Barth
Am 26.06.2012 17:15 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > > Mark Morgan Lloyd wrote: >>> >>> I'm currently tinkering with shared libraries, using cmem, mainly on Linux. In one case the main-program code is multithreaded, but so far I'm not moving data between threads

Re: [fpc-pascal] Shared libraries and threadvars

2012-06-26 Thread Sven Barth
Am 26.06.2012 20:09 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > One final question if I may: noting Ludo's example elsewhere: > > > In the project.lpr add the following code: > > > > Procedure qt_startup_hook;export; > > Begin > > End; > > > > Exports qt_startup_hook; > > C

Re: [fpc-pascal] Unhandled exception from library crashes host exe

2012-06-27 Thread Sven Barth
Am 27.06.2012 15:59 schrieb "kyan" : > > I am sure that this has been asked before but I couldn't find an answer. > > I am in the process of porting a large application consisting of an > exe and many dlls from Delphi7 to FPC 2.7.1/Lazarus for Windows/WinCE > with hopes of being able to finally por

Re: [fpc-pascal] record helper types in 2.6

2012-06-28 Thread Sven Barth
Am 28.06.2012 15:23 schrieb "Bernd" : > > hello, I am referring to this: http://wiki.freepascal.org/Helper_types > > I am using 2.6.1 from the fixes branch, last updated no longer than a week ago. > > the wiki mentions this syntax: > > TTestHelper = record helper for TTest > procedure SomeMethod;

Re: [fpc-pascal] Header translation, argument list, array of const?

2012-06-30 Thread Sven Barth
Am 30.06.2012 03:25 schrieb "kyan" : > A pascal open array of const which is the closest concept to a C > ellipsis may have similar semantics but its binary representation on > the parameter stack is completely different. First of all, since it > has to work in all calling conventions and not just

Re: [fpc-pascal] Header translation, argument list, array of const?

2012-06-30 Thread Sven Barth
Am 30.06.2012 12:50 schrieb "Bernd" : > > 2012/6/30 Sven Barth : > > > Your explanation is very nice and mostly correct, but in case of external > > cdecl functions in FPC the "varargs" modifier and a "array of const" > > parameter imply the

Re: [fpc-pascal] Custom operators for non-record types

2012-07-01 Thread Sven Barth
On 01.07.2012 17:39, JC Chu wrote: In Delphi mode, each custom operator has to be associated with a record type, and must take or return such a record. It seems that the OBJFPC mode doesn’t have this restriction; for example, the Math unit exports a custom ** on Int64, which is a simple type.

Re: [fpc-pascal] Custom operators for non-record types

2012-07-02 Thread Sven Barth
Am 02.07.2012 04:46, schrieb JC Chu: Do you have some inside information on the extra limitations regarding ordinal, floating point, and set types? As I understand, the only limitation on operator “overloading” should be that the operator do not have a default interpretation for the operands–res

Re: [fpc-pascal] Custom operators for non-record types

2012-07-02 Thread Sven Barth
Am 02.07.2012 16:51 schrieb "JC Chu" @ acm.org >: > ◦ Restrictions on the string-as-the-first-operand case have been relaxed. I don't know whether you realized that already, but the isbinaryoperatoroverloadable function is called twice: once with the order given by the user and once with the ord

Re: [fpc-pascal] Custom operators for non-record types

2012-07-03 Thread Sven Barth
Am 03.07.2012 02:51, schrieb JC Chu: isbinaryoperatoroverloadable() is called once. It first calls internal_check() with the default (LHS, RHS) order. internal_check() accepts or rejects the pair only if it recognizes the pair. Only if (LHS, RHS) is not recognized, will internal_check() be cal

Re: [fpc-pascal] Custom operators for non-record types

2012-07-03 Thread Sven Barth
Am 03.07.2012 02:49, schrieb JC Chu: Yes. I made that error in my first patch. The new compiler wasn’t even able to compile itself… I don't know whether you know this, but: * testing the compiler compilation (as a first step) is best done using "make cycle" in the compiler subdirectory (opti

Re: [fpc-pascal] Custom operators for non-record types

2012-07-03 Thread Sven Barth
Am 03.07.2012 12:23 schrieb "JC Chu" : > > On Tue, Jul 3, 2012 at 3:55 PM, Sven Barth wrote: > > I don't know whether you know this, but: > > * testing the compiler compilation (as a first step) is best done using > > "make cycle" in the comp

Re: [fpc-pascal] Longstrings

2012-07-04 Thread Sven Barth
Am 04.07.2012 12:46, schrieb Rainer Stratmann: Am Wednesday 04 July 2012 12:12:10 schrieb Bart: On 7/4/12, Rainer Stratmann wrote: Next question is how to put asmmode intel global on? Type fpc -h (in a console) to see all commandine parameters. Then take a look at the -R switch. That works

Re: [fpc-pascal] Re: Win64 SEH patch fixes some Firebird embedded bugs

2012-07-09 Thread Sven Barth
On 09.07.2012 14:22, Michael Van Canneyt wrote: Major issue 2: I used dummy relocations to link in required .pdata sections, but this cannot be expressed using gas. This means either smartlinking should be disabled with gas, or the entire .pdata will be dropped, making SEH unusable. You even co

Re: [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Sven Barth
Am 12.07.2012 10:11 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > > I've found a problem when a (well-tested) program that connects to a PostgreSQL database is compiled and run on Solaris 10 for SPARC, Linux SPARC is OK. > > I appreciate that this is a minority platform, but

Re: [fpc-pascal] Patch application

2012-07-12 Thread Sven Barth
Am 12.07.2012 12:20 schrieb "JC Chu" : > > I uploaded a patch in #22359 about a week ago but I see that it’s not > been applied yet. (There was something wrong in previous versions but > I believe the latest one should be correct.) Since it’s been about a > week, I’m wondering if there’s still so

Re: [fpc-pascal] Cross platform signal handler?

2012-07-15 Thread Sven Barth
Am 15.07.2012 04:39, schrieb leledumbo: Do we have it? And if not, what's the available solution for windows? It will depend on what you want to achive. So, what do you need it for? Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

Re: [fpc-pascal] Variable of class method type of function

2012-07-16 Thread Sven Barth
Am 17.07.2012 01:10 schrieb "waldo kitty" : > > On 7/15/2012 08:13, Jonas Maebe wrote: >> >> On 15 Jul 2012, at 14:05, CA Gorski wrote: >> >>> How to declare a variable of class method type of function? >>> >>> ... >>> var >>> MyVar: function(AParam: string): boolean of class; >>> ... >>> gives

Re: RE : [fpc-pascal] Database problem on Solaris SPARC

2012-07-17 Thread Sven Barth
Am 17.07.2012 11:12, schrieb Mark Morgan Lloyd: Ludo Brands wrote: We only support 32 bit SPARC, and there we split a 64 bit load into two 32 bit loads. dbl, assuming it points to a double, should point to a 64 bit-aligned memory location though (depending on the cpu, 32 bit alignment may be s

Re: [fpc-pascal] Re: UnicodeString comparison performance

2012-07-24 Thread Sven Barth
Am 24.07.2012 13:21, schrieb OBones: Thomas Schatzl wrote: This code is not thread safe at all. A thread switch after the while loop and before the increment will not prevent progress on other threads, so multiple threads can enter the "critical section". Well, yes, even if under Windows it's r

Re: [fpc-pascal] Initialization of class field

2012-07-31 Thread Sven Barth
On 31.07.2012 14:56, michael.vancann...@wisa.be wrote: On Tue, 31 Jul 2012, Krzysztof wrote: Hi, I'm reading about variable initialization (http://www.freepascal.org/docs-html/ref/refse22.html) . Can I initialize class field too? Like in Java: type TMyClass = class private FSomeField:

Re: [fpc-pascal] Re: Initialization of class field

2012-08-01 Thread Sven Barth
Am 01.08.2012 00:14, schrieb leledumbo: I think the fast point from OP point of view is the less typing, less source code. Not from executable point of view. Might be, but as there are people that are complaining about class instance initialization speed (the instance's memory is initialized

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

2012-08-06 Thread Sven Barth
On 06.08.2012 19:28, Rainer Stratmann wrote: Am Monday 06 August 2012 18:43:04 schrieb Martin: How to get all caller adresses of p1 in a program before p1 is executed? For example p1 is called from 20 different places in a program. Then I need the 20 caller adresses. At run time, or design ti

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

2012-08-06 Thread Sven Barth
On 06.08.2012 19:56, Rainer Stratmann wrote: Am Monday 06 August 2012 19:34:23 schrieb Sven Barth: You know that scanning the binary code for calls is platform dependant? Yes. [calling opcode] [calleradress] calling opcode can differ and the byteorder of the adress can differ. The problem

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

2012-08-06 Thread Sven Barth
On 06.08.2012 21:48, Rainer Stratmann wrote: Out of curiosity: why don't you use resourcestrings? It seems that is has not the flexibility and simplicity (in its entirety) that I want. I would not call your method "simple" It may is in the beginning more difficult to implement, but if it run

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

2012-08-06 Thread Sven Barth
On 06.08.2012 22:22, Marco van de Voort wrote: In our previous episode, Sven Barth said: The function returns the right language. Somehow this sounds like the GNU GetText function _() works. With the exception that the text which has to be translated is simply searched by looking through the

Re: [fpc-pascal] Label

2012-08-09 Thread Sven Barth
Am 09.08.2012 15:35, schrieb Jonas Maebe: Rainer Stratmann wrote on Thu, 09 Aug 2012: Is it possible to get the adress of a label in a procedure? Not outside that procedure, no. Just because it sounds that way: is it possible inside the procedure? Regards, Sven __

Re: [fpc-pascal] Label

2012-08-09 Thread Sven Barth
Am 09.08.2012 17:49, schrieb Jonas Maebe: It's not "my style of programming". I've never used resourcestrings in my life (because I've never worked on a multilingual program, not because I've used something else instead). The compiler is a multilingual program and uses a different mechanism th

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

2012-08-12 Thread Sven Barth
On 12.08.2012 15:37, Rainer Stratmann wrote: Am Sunday 12 August 2012 15:25:17 schrieb Mark Morgan Lloyd: Hey, Jonas, when are you introducing the optimisation that a call at the end of a procedure can be replaced by a jmp? :-) Jonas only introduces something if it causes not much work :-) I

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

2012-08-12 Thread Sven Barth
On 12.08.2012 15:57, Rainer Stratmann wrote: Am Sunday 12 August 2012 15:46:00 schrieb Sven Barth: I know there is a smiley, but: Only because Jonas sees no gain in implementing something in the compiler that would help you in your specific case does not mean that Jonas doesn't add any

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

2012-08-14 Thread Sven Barth
Am 14.08.2012 09:11, schrieb Rainer Stratmann: No need for tons od additional identyfiers and additional lines like: var p_snippet1 : pchar; p_snippet2 : pchar; p_snippet3 : pchar; const id_snippet1 = 'ids_snippet1'; id_snippet2 = 'ids_snippet2'; id_snippet3 = 'ids_snippet3'; p_sni

Re: [fpc-pascal] Re: fpdoc executable both in bin and utils\fpdoc - but not fpdoc.css

2012-08-14 Thread Sven Barth
On 14.08.2012 11:29, Reinier Olislagers wrote: Meanwhile I think the world has evolved to other practices :-) Tell that to the people who use fpc.cfg ;) On Unix based systems it is standard that the fpc.cfg is either located in /etc or is in your home directory as .fpc.cfg. On Windows based

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

2012-08-15 Thread Sven Barth
Am 15.08.2012 10:48 schrieb "Rainer Stratmann" : > > While this may all be very well known to you, I would ask you to step > > back and consider it: having a detached look at it may lead to a better > > choice. > > For me it would be interesting to know how dxgettext gets the snippet > information

Re: [fpc-pascal] Re: linux: should we hard-code versioned or unversioned shared libraries in our apps?

2012-08-15 Thread Sven Barth
Am 15.08.2012 17:02 schrieb "Graeme Geldenhuys" : > I had a quick look to see what other (non FPC based) application do. > FlameRobin has a dependency on libfbclient.so.2 (thus versioned .so > library). That's why it works without having to install the -devel > package. Did you look at the source/

Re: [fpc-pascal] Malformed email messages

2012-08-16 Thread Sven Barth
Am 16.08.2012 15:28, schrieb Henry Vermaak: On 16/08/12 13:53, microc...@zoho.com wrote: Is anybody else receiving mailformed emails from the list? The only weirdness I get is Ludo's subject header. The subject of the first message in the thread was: [fpc-pascal] linux: should we hard-code v

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Sven Barth
On 18.08.2012 17:48, Ludo Brands wrote: Only in {$mode delphiunicode} (which is what you should use if you want to compile code written for a Delphi version in which string=unicodestring). Is this hidden gem announced or documented somewhere? Is there a -M compiler switch to set it as default

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Sven Barth
On 18.08.2012 21:20, Graeme Geldenhuys wrote: Hi, On 18 August 2012 16:11, Jonas Maebe wrote: 1) Is it correct that String <> AnsiString any more? Only in {$mode delphiunicode} (which is what you should use if you want to compile code written for a Delphi version in which string=unicodestr

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Sven Barth
On 18.08.2012 16:15, Jürgen Hestermann wrote: The few things I know about are: Am 2012-08-18 15:54, schrieb Graeme Geldenhuys: 1) Is it correct that String <> AnsiString any more? Well, it never was. At least "string" could also be a shortstring, maybe other strings too meanwhile (I don't kn

Re: [fpc-pascal] Assembler file generate by compiler

2012-08-19 Thread Sven Barth
On 19.08.2012 17:59, Rainer Stratmann wrote: Am Sunday 19 August 2012 16:50:20 schrieb Jonas Maebe: On 19 Aug 2012, at 16:45, Rainer Stratmann wrote: fpc 2.4.2-0 [2010/11/11] for i386 I put "-a" to projectsettings -> other -> userdefined settings Output of the message window when compiling: N

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Sven Barth
Am 20.08.2012 14:05, schrieb Jürgen Hestermann: Am 2012-08-20 00:17, schrieb Bart: > Does fpc have a function that determines if a given paths is the root > (e.g. '/' in Linux, 'F:\' in Windows)? The question is: For what reason is this function needed? If you use "subst" on Windows you can ma

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Sven Barth
Am 21.08.2012 14:10, schrieb Jorge Aldo G. de F. Junior: "With no error messages, or even with no changes to the program since 1 and a half year in the repository, the scientific calculations are now all blown up, and program outputs only errors at runtime. The maintainer now curses and chases me

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-21 Thread Sven Barth
that regard. I wrote about why the compiler does not and should not warn because of a collision in naming of symbols in different units. Regards, Sven 2012/8/21 Sven Barth : Am 21.08.2012 14:10, schrieb Jorge Aldo G. de F. Junior: "With no error messages, or even with no changes t

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-22 Thread Sven Barth
Am 21.08.2012 21:42, schrieb Jorge Aldo G. de F. Junior: Instead of implementing the half-assed C++ namespace model, just add to the compiler a warning when it detects that there is a collision in the current scope (two functions with the same parameters from different units that can be called fr

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Sven Barth
Am 22.08.2012 12:37, schrieb Timothy Madden: On 08/22/2012 09:57 AM, Marco van de Voort wrote: In our previous episode, Marcos Douglas said: [...] Requiring all functions to be allways fully qualified will make the most commom case worse than current implementation just to be better for the

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread Sven Barth
Am 22.08.2012 13:47, schrieb OBones: Jonas Maebe wrote: OBones wrote on Wed, 22 Aug 2012: Olivier SANNIER wrote: Does any of you have any suggestion as to explain this behavior, and best of all, how to fix it? I went further and changed the code this so that I can get better details as to w

Re: [fpc-pascal] Unit testing aid...

2012-08-23 Thread Sven Barth
Am 22.08.2012 21:56, schrieb Martin: On 22/08/2012 18:08, Michael Van Canneyt wrote: Hi, for those that do unit testing, I committed a small tool "pas2ut" which analyses a unit, and creates a unit with a number of (empty) test cases. Obviously, the unit should be compileable (well, at least it

Re: [fpc-pascal] Unit testing aid...

2012-08-23 Thread Sven Barth
Am 22.08.2012 21:56, schrieb Martin: On 22/08/2012 18:08, Michael Van Canneyt wrote: Hi, for those that do unit testing, I committed a small tool "pas2ut" which analyses a unit, and creates a unit with a number of (empty) test cases. Obviously, the unit should be compileable (well, at least it

Re: [fpc-pascal] variant.inc(82, 10) Error: Illegal type conversion: "Text" to "TextRec"

2012-08-24 Thread Sven Barth
Am 24.08.2012 21:21 schrieb "Jonas Maebe" : > > > On 24 Aug 2012, at 20:52, ik wrote: > > > For two weeks now, I have the following error message with FPC 2.7.1: > > variant.inc(82,10) Error: Illegal type conversion: "Text" to "TextRec" > > > > I'm currently on r22233. Arch Linux 64 bit. > > The la

Re: [fpc-pascal] Language mode, assembler style

2012-08-25 Thread Sven Barth
On 25.08.2012 12:00, Rainer Stratmann wrote: Why is -Mfpc the default language style? > I assume -Mobjfpc or -M2 is the most used style. > "fpc" was the first mode that FPC supported, so that's kept because of backwards compatibility. Why does -Mobjfpc overwrite the assember style? Becau

Re: [fpc-pascal] Language mode, assembler style

2012-08-25 Thread Sven Barth
On 25.08.2012 12:22, Marco van de Voort wrote: In our previous episode, Sven Barth said: Because only for modes TP and Delphi the default style is Intel instead of AT&T which was chosen as the default for FPC (not the mode, but the compiler) on x86 systems. And before you ask: I don't

Re: [fpc-pascal] Daily Source Snapshot of Development Tree (trunk)

2012-08-26 Thread Sven Barth
On 26.08.2012 20:11, Rainer Stratmann wrote: http://www.freepascal.org/develop.var ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip Is this always the latest trunk version? It is the latest trunk version from when the snapshot was generated (normally around midnight). Or is

Re: [fpc-pascal] Including binary data making easy

2012-08-28 Thread Sven Barth
On 27.08.2012 15:33, Rainer Stratmann wrote: Am Monday 23 March 2009 15:51:24 schrieb Jonas Maebe: Rainer Stratmann wrote on ma, 23 mrt 2009: Would this be possible? // get access to the data of file.dat // have 1 executable file with containing all the data {$ir file.dat mydata} // include r

  1   2   3   4   5   6   7   8   9   10   >