Re: [fpc-pascal] Re: operator overloading and counting references / creating / destoying anonymous instances

2011-07-30 Thread Jürgen Hestermann
Henry Vermaak schrieb: I think operator overloading is a pain. As you said: What is the advantage? For me operators should be defined by the language only It improves readability, making it more logical. Just the opposite! It hides important imformation for the reading person. Say for

Re: [fpc-pascal] Re: operator overloading and counting references / creating / destoying anonymous instances

2011-07-30 Thread Jürgen Hestermann
Say for instance you are working on Galois fields and you have to do arithmetic on the elements like this: g1 + g2 / g3 If you don't have operator overloading, you have to do it with functions, like this: gf_add(g1, gf_div(g2, g3)) This is not very readable, I'm sure you will agree.

Re: [fpc-pascal] Re: operator overloading and counting references / creating / destoying anonymous instances

2011-07-31 Thread Jürgen Hestermann
Florian Klämpfl schrieb: Why? Searching for operator+ is no more difficult than for function add ? I don't what I have to search for when looking for the overload function of the operator +. Can I search for the text operator+? Never heard of this... Also, when I use a function instead of

Re: [fpc-pascal] Re: operator overloading and counting references / creating / destoying anonymous instances

2011-07-31 Thread Jürgen Hestermann
Florian Klämpfl schrieb: Am 31.07.2011 10:42, schrieb Jürgen Hestermann: Florian Klämpfl schrieb: Why? Searching for operator+ is no more difficult than for function add ? I don't what I have to search for when looking for the overload function of the operator +. Can I

Re: [fpc-pascal] Overloading the increment operator (+=)

2011-09-11 Thread Jürgen Hestermann
Flávio Etrusco schrieb: += can't be efficiently implemented with two operations (since concatenating the operand would be unexpected to the user...). Why not use inc(x,y)? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] How do I load external Pascal code?

2011-10-13 Thread Jürgen Hestermann
Andrew Pennebaker schrieb: I understand that units are designed to be reusable code / libraries / APIs. It's a practical way to organize code, and a pretty good name for it, too. In Pascal, units can have optional initialization and finalization code (syntax as shown in the link by

Re: [fpc-pascal] How do I load external Pascal code?

2011-10-13 Thread Jürgen Hestermann
Andrew Pennebaker schrieb: In some languages, especially scripting languages, units can serve dual purposes. They can act as both a library and a self-sufficient program. RosettaCode describes this behavior as scripted main. If it's possible to compile a Pascal unit such that it executes

Re: [fpc-pascal] More Filter Madness

2011-10-15 Thread Jürgen Hestermann
Rich Saunders schrieb: On 10/14/11 2:39 AM, Nataraj S Narayan wrote: Good candidate for recursive algorithm i think. At first glance maybe, but it is actually a horrible candidate. That is due to the fact that the number of values is unknown and recursion has a built-in limit based on the

Re: [fpc-pascal] Any command line interpreters for Free Pascal?

2011-10-15 Thread Jürgen Hestermann
Andrew Pennebaker schrieb: Adding shebangs to fpc wouldn't kill Pascal or compiled programming. Of course not. It just binds man power to something useless (IMO). It would welcome scripting programmers into the Pascal community, and let Pascal programmers write and test code more quickly.

Re: [fpc-pascal] Any command line interpreters for Free Pascal?

2011-10-16 Thread Jürgen Hestermann
Andrew Pennebaker schrieb: Yes, there is a distinction to be made between an interpreted environment, say, GHCi, and instantfpc, which is simply a compiler wrapper just advanced enough to let you ./ your Pascal programs. But hiding away the compilation step from the user does not turn a

Re: [fpc-pascal] More Filter Madness

2011-10-16 Thread Jürgen Hestermann
Alberto Narduzzi schrieb: Recursion is for other things, such as expression parsing etc. where you don't (and neither possibly can't) actually know how deep may the nesting. Well, I would advice only to use it if you *know* the maximum nesting depth. Otherwise it can crash easily. A good

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-20 Thread Jürgen Hestermann
Florian Klämpfl schrieb: If anybody does not see why increasing complexity without a good reason should be avoided, I recommend: I agree wholeheartly. In the past Pascal was a simple still powerfull language but meanwhile it has become a catchment tank for all features of all other

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-10-21 Thread Jürgen Hestermann
Juha Manninen schrieb: Please look at some old Pascal code from 80's. Lots of shortstring manipulation with pointers. Very much comparable to C, and as prone to errors as C. Yes, new string types were needed. But why not doing it right in one step? Instead we now have lots of different

Re: [fpc-pascal] Free Pascal 2.6.0rc1 released

2011-11-06 Thread Jürgen Hestermann
Marco van de Voort schrieb: We have placed the first release-candidate of the Free Pascal Compiler version 2.6.0 on our ftp-servers. Here some issues I found: The text mode IDE states under Help: Copyright (C) 1998-2009 by... Shouldn't this be 1998-2011? When I now try to compile a short

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-06 Thread Jürgen Hestermann
Florian Klämpfl schrieb: Am 06.11.2011 15:13, schrieb dmitry boyarintsev: Hi-jacking, the thread, and again should FPC chase Delphi forever? You mix here result and goal. If FPC supports new Delphi constructs depends on the fact if somebody provides a patch. No more, no less. I have the same

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-06 Thread Jürgen Hestermann
Florian Klämpfl schrieb: I have the same feeling as Dmitry: There must be a time when FPC does not run after Delphi. Why not now? Feel free to start a fork and we will see what will make it into trunk. Sorry, but I don't know what you are talking about. Isn't it you (and a few others) who

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-07 Thread Jürgen Hestermann
Jonas Maebe schrieb: That's exactly what he said: you are free to create a fork (= take the FPC source code and do whatever you want with it), and then the currently active FPC developers are also free to take whichever of your patches they consider useful. What's not possible is that other

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-07 Thread Jürgen Hestermann
Jonas Maebe schrieb: That's exactly what he said: you are free to create a fork This argument is pulled out each time someone suggest things that the main developers don't like. The reason that this argument is always used is simply because that is simply how it is. I know that. But still:

Re: [fpc-pascal] More fun with dynamic arrays

2011-11-17 Thread Jürgen Hestermann
andrew.benn...@ns.sympatico.ca schrieb: Procedure Init(Out X : DataA ; Const N : Longint) ; 1) I substitute Var for Out. This leads to the warning that X is not initialized. Which is correct. If you define a parameter to be for output only the compiler does exactly this. 2) I

Re: [fpc-pascal] Free Pascal 2.6.0rc1 released

2011-11-26 Thread Jürgen Hestermann
Bernd schrieb: I wanted to switch down one gear, not two. What would be the correct 2.6 stabilizing/soon-to-become-stable branch if this is the wrong one? As far as I understand it, versions with odd digits after the decimal point are unstable and even numbers are stable. So the stable

Re: [fpc-pascal] Wireless configuration in Windows

2011-11-29 Thread Jürgen Hestermann
Felipe Monteiro de Carvalho schrieb: type WlanOpenHandleTyp = function(ClientVersion : DWord; Reserved : Pointer; var NegotiatedVersion : DWord; var ClientHandle : Hwnd) : DWord; It looks like you

Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

2011-12-07 Thread Jürgen Hestermann
Florian Klaempfl schrieb: Well, once we thought we try to do things better than Delphi ;) Some people, I think John Lee, asked for a better random in FPC years ago so Jonas implemented a MT. I think there are two very different approaches. I wrote a small tool for testing network performance

Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

2011-12-07 Thread Jürgen Hestermann
Graeme Geldenhuys schrieb: I would suggest the default Random() call uses a higher speed performance generator though, and not the MT one. Fully agree. Especially, because ex Delphi (and ex Turbo Pascal) users would expect it like that. And most of them (coming from Delphi/TP) believe

Re: [fpc-pascal] Re: Why is Random(255) some 529x slower compared to Delphi7?

2011-12-08 Thread Jürgen Hestermann
Schindler Karl-Michael schrieb: How disgraceful is a replacement by a less accurate solution and how about the grace to implement your own solution ;-) You miss the whole point. It's not a matter of coding effort but of backwards compatibility with existing code and also with

Re: [fpc-pascal] Re: Why is Random(255) some 529x slower compared Delphi 7?

2011-12-08 Thread Jürgen Hestermann
Schindler Karl-Michael schrieb: The only question is on the time, when computers are so fast, that hardly anyone will bother about speed of the method. That's nonsense. The only thing that happens if computers speed increases is, that you put more code into the same time slot. Otherwise

Re: [fpc-pascal] Re: Why is Random(255) some 529x slower compared to Delphi7?

2011-12-08 Thread Jürgen Hestermann
Tomas Hajny schrieb: Since when does the definition of compatibility include the same speed? Well, a factor of multiple hundreds is not just a different speed. It makes the function unusalbe for the same purpose. ___ fpc-pascal maillist -

Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

2011-12-08 Thread Jürgen Hestermann
Reimar Grabowski schrieb: The parameter should default to FALSE to not break existing code relying on FPCs random function And what about existing code coming from Delphi/Turbo Pascal? This was a strong argument in the past for doing even crap coding. As the fast random function then has

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Jürgen Hestermann
David Emerson schrieb: 1. Is it possible to make an alias to a function ... so rather than just re-calling with the same parameters, it's actually the same thing? like the way we can do, e.g., type natural = cardinal, or const GG = 6, but with a function? I think you can declare a type

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

Re: [fpc-pascal] Re: Access violation that I do not understand while creating a class instance

2012-01-23 Thread Jürgen Hestermann
ik schrieb: PChar is an array like approach. AnsiString, is a record based pointer. It uses more memory, and provide a bit overhead for the same thing. At least on theory. I would love to learn that it's not the case. AnsiString stores and keeps track of the string length and this has many

Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work

2012-02-07 Thread Jürgen Hestermann
Reinier Olislagers schrieb: And while ~ is a relative path, No, this is an absolute path (pointing to the home directory). It only needs expansion to give you this absolute path. It's just a placeholder for a certain absolute path (which can vary). One or two dots would be a relative path

Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work

2012-02-07 Thread Jürgen Hestermann
Reinier Olislagers schrieb: That's fine. If you just say anything gets expanded to an absolute path, in my mind: 1. you're implying the thing you're expanding is relative (even if you're not saying so) No, IMO this is not true. A relative path is relative to the current directory (or some

[fpc-pascal] AsyncCalls no longer works with Free Pascal?

2012-02-20 Thread Jürgen Hestermann
I just wanted to try AsyncCalls and downloaded the most recent version 2.99. But when compiling a project that uses it I get an error 'Your compiler version is not supported'. Anybody who knows whether this can be circumvented? Or is AsyncCalls no longer usable with Free Pascal?

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Jürgen Hestermann
Graeme Geldenhuys schrieb: On 24 February 2012 16:13, Henry Vermaak wrote: Because case sensitive systems don't create as much confusion. Here my thoughts are the opposite. While backing up my data no an external drive with is case insensitive I came across a lot of possible issues I never

Re: [fpc-pascal] OT: Amazing new development tools

2012-02-26 Thread Jürgen Hestermann
Roland Schäfer schrieb: I am just very busy and really just beg you to respect my decision to be on the fpc-pascal list and not visions-other. Then why don't you simply ignore (delete) the posts with the subject Amazing new development tools? That's what I am doing: Just open posts which

Re: [fpc-pascal] Re: FPC with case insensitive file system under Linux

2012-02-27 Thread Jürgen Hestermann
Virgo Pärna schrieb: Essentialy, case insensitive filesystems are less problematic. No, just the opposite. The problems are only moved (and increased) from the techie level (where it should belong to) to the user. This is not a good idea IMO. If there problems with capitalization of

Re: [fpc-pascal] Spam

2012-03-11 Thread Jürgen Hestermann
Jonas Maebe schrieb: Sorry about this spam message. This person simply subscribed to the list and then sent the message. I've now changed the list options so that new members are moderated by default. This may result in some new members' first real posts to be accidentally discarded along

Re: [fpc-pascal] Spam

2012-03-12 Thread Jürgen Hestermann
waldo kitty schrieb: ummm... speaking as one who has fought the spammers and won their mailbox back from them, this is much bovine fecal material... i have fought them from +1000/day spams back to less than ~5/day... it is very possible but one nes to stay vigilant and report the spams to

Re: [fpc-pascal] Problems with assigning pointers

2012-04-10 Thread Jürgen Hestermann
dhkblas...@zeelandnet.nl schrieb: edge_list[edge_count - 1].v1 := v1; // after this line the value of v1^.x suddenly is changed!!??!! Could it be that you do something else with edge_list before the assignment? Keep in mind that edge_list is a dynamic array and therefore a pointer

Re: [fpc-pascal] Re: Problems with assigning pointers

2012-04-11 Thread Jürgen Hestermann
Vincent Snijders schrieb: type TVertex = record x: double; y: double; end; PVertex = ^TVertex; TEdge = record v1: PVertex; v2: PVertex; end; . . Result := @vert_list[vert_count - 1]; I think this is not correct. If you increase the size of vert_list, then the

[fpc-pascal] Program without window but messages

2012-04-24 Thread 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: program Test;

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

2012-04-25 Thread Jürgen Hestermann
Sven Barth schrieb: When I create a new project and select to create an Application, copy the above into the main program (ignoring Unit1.pas) and run the program I get an exception Fensterklasse nicht gefunden (in german, although I setup Lazarus in english!) This specific exception could

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

2012-04-25 Thread Jürgen Hestermann
leledumbo schrieb: You need to call Application.Initialize prior to anything if you want to use LCL features (including its dialogs). Is ShowMessage part of the LCL? I thought that it comes with Free Pascal directly because the wiki http://wiki.freepascal.org/Dialog_Examples/de#ShowMessage

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

2012-04-25 Thread Jürgen Hestermann
Sven Barth schrieb: You are talking about doing this in Lazarus? Then you should complain on the Lazarus list, because such lookups are part of the CodeTools of Lazarus (and as this function is part of an include file, there are some problematic cases still) Yes, you are right (again). ;-)

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

2012-04-25 Thread Jürgen Hestermann
JC Chu schrieb: Try this. program Test; {$MODE DELPHI} {$APPTYPE GUI} uses {$IF Defined(UNIX) and Defined(UseCThreads)}cthreads,{$ENDIF} Interfaces, Forms, Dialogs; begin Application.Initialize; ShowMessage('Test'); end. Yes, this works! Now I

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

2012-04-25 Thread Jürgen Hestermann
Howard Page-Clark schrieb: A GUI program requires a main window since that is the avenue for user interaction. You can hide that window (not ignore it) as in the following program, which compiles and runs. However, I can't myself see the use of such truncated GUI functionality. Once the

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

2012-04-25 Thread Jürgen Hestermann
Jonas Maebe schrieb: Is ShowMessage part of the LCL? I thought that it comes with Free Pascal directly because the wiki http://wiki.freepascal.org/Dialog_Examples/de#ShowMessage , which explains this message, is located on wiki.freepascal.org. http://wiki.freepascal.org is exactly the same

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

2012-05-12 Thread Jürgen Hestermann
Noah Silva schrieb: Thus, the only question would be whether you have to manually convert a UnicodeString to a UTF8String or not. No, that would not help. Under Windows you can access long paths *only* when using special functions (i.e. FindFirstFileW instead of FindFirstFileA). And these

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

2012-05-19 Thread Jürgen Hestermann
Given that, it doesn't really make sense to use the *A versions at all in Windows (Unless you want to support very old Windows versions). Thus the approach for Windows should be the opposite of Unix, I suppose. UTF8 or ANSI gets converted to UTF16 and call the *W functions. That's true. In

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

2012-05-19 Thread Jürgen Hestermann
Sven Barth schrieb: If you change do_open to support Unicode you should do this for the other functions (e.g. write, read) as well so that only the *W functions are used for them. I think read/write only work on the file handle and don't use the file name. So no changes are needed here (I

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

2012-05-19 Thread Jürgen Hestermann
Marco van de Voort schrieb: I'm not sure if the *rec records can handle pointers, one probably can't use reference types in them, because the standard filedescriptions are threadvars. Think what happens if those are simply cloned. Of course, all cloning needs to be changed too so that the

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

2012-05-20 Thread Jürgen Hestermann
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 change functions like WriteFile to WriteFileW (etc.)... There is no WriteFileW.

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

2012-05-20 Thread Jürgen Hestermann
In fpc\rtl\inc\file.inc (and fpc\fpc\rtl\inc\text.inc) the declaration of Assign uses the generic String type for the file name. I think this can be AnsiString too, so it may be longer than 255 characters. But the assignment to the internal *rec element name (which is array[0..255] of char) is

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

2012-05-20 Thread 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, unit System (which uses these include files) is never compiled with $H+. Ok

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

2012-05-21 Thread Jürgen Hestermann
Sven Barth schrieb: But I am always wondering why in such situations the type is not set to ShortString. Why use generic String type if all code relies on the fact that it may never change from ShortString to some other string type? It's just asking for trouble and also makes the code

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

2012-05-22 Thread Jürgen Hestermann
Jonas Maebe schrieb: That's a non sequitur: a) even though the original code was written a long time ago, it has been changed many times since then b) if it isn't broken, don't fix it. Example: changing all occurrences of string into shortstring will break the system unit. The reason is

Re: [fpc-pascal] Longstrings

2012-07-03 Thread Jürgen Hestermann
Am 2012-07-04 00:48, schrieb Rainer Stratmann: How to put longstrings globally on? I tried with {$h+} in project compiler settings (other) with no effect. Safest method is not to use the generic type string in your code. Instead use directly the string type that you need (i.e. ansistring or

Re: [fpc-pascal] Longstrings

2012-07-04 Thread Jürgen Hestermann
Am 2012-07-04 10:22, schrieb Marco van de Voort: Safest method is not to use the generic type string in your code. Instead use directly the string type that you need (i.e. ansistring or unicodestring). I wouldn't do that. That makes later migration unnecessary involved. I find it quite

[fpc-pascal] How to find a graphic element in the form editor?

2012-08-07 Thread Jürgen Hestermann
When I want to add a graphic element like TFileNameEdit which I have already used in other programs in the form editor I don't know how to find it in the menu. I am clicking on each tab one after the other then hovering over each element to see whether it is what I am searching for. This is more

Re: [fpc-pascal] How to find a graphic element in the form editor?

2012-08-07 Thread Jürgen Hestermann
Am 2012-08-07 14:20, schrieb Howard Page-Clark: On 07/8/12 1:10, Jürgen Hestermann wrote: When I want to add a graphic element like TFileNameEdit which I have already used in other programs in the form editor I don't know how to find it in the menu. Although this is the fpc list you mention

[fpc-pascal] WeekDay outdated?

2012-08-12 Thread Jürgen Hestermann
I am not able to use this function: http://www.freepascal.org/docs-html/rtl/dos/weekday.html nor can I find it in the sources. Does it still exist? If yes, how to use it? Which unit? DOS does not work. ___ fpc-pascal maillist -

Re: [fpc-pascal] WeekDay outdated?

2012-08-13 Thread Jürgen Hestermann
Am 2012-08-13 00:02, schrieb Daniel Gaspary: On Sun, Aug 12, 2012 at 2:05 PM, Jürgen Hestermann juergen.hesterm...@gmx.de wrote: I am not able to use this function: http://www.freepascal.org/docs-html/rtl/dos/weekday.html nor can I find it in the sources. Does it still exist? If yes, how

Re: [fpc-pascal] WeekDay outdated?

2012-08-13 Thread Jürgen Hestermann
Am 2012-08-13 11:08, schrieb Jonas Maebe: The weekday function only exists in the unix version of the Dos unit. That's strange (and not documented). It should probably either be removed from its interface, or added to the common part of the Dos unit (there's nothing unix-specific about it).

Re: [fpc-pascal] WeekDay outdated?

2012-08-13 Thread Jürgen Hestermann
Am 2012-08-13 11:17, schrieb Howard Page-Clark: Sysutils has an integer DayOfWeek function, and dateutils has a word DayOfTheWeek function. Both take a TDateTime parameter (rather than the separate year, month, day parameters of the old dos unit). Yes, I already saw this. But this requires a

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

2012-08-18 Thread Jürgen Hestermann
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 know). 3) If false, what must I enable/toggle

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

2012-08-19 Thread Jürgen Hestermann
Am 2012-08-18 22:33, schrieb Sven Barth: The RTL mostly uses PChar to not be restricted to 255 characters (exceptions are ancient compatibility units like DOS, Objects, etc.). There are often overloads for ShortString and AnsiString though. AFAIK all file handling routines use the file record

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

2012-08-20 Thread 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 make every path to a root path if you want. The

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

2012-08-20 Thread Jürgen Hestermann
Am 2012-08-20 14:38, schrieb Sven Barth: Am 20.08.2012 14:05, schrieb Jürgen Hestermann: The question is: For what reason is this function needed? If you use subst on Windows you can make every path to a root path if you want. Maybe because he wants to determine whether a path is absolute

[fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Jürgen Hestermann
Am 2012-08-20 16:28, schrieb Mattias Gaertner: Apparently it is a bad idea to scan a root directory. See http://bugs.freepascal.org/view.php?id=22630 Well, it is a bad idea to wildly scan directory branches just in case at all. That's fooling so many people and there is no good reason for

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jürgen Hestermann
Am 2012-08-21 00:00, schrieb Bart: My Delphi projects are located like this: ... As Juha has pointed out, this is a general way projects are organized. Realy? How do you know? That's just an assumption. But my complain was more general about an increasing use of branch scanning (not only

Re: [fpc-pascal] Searching for files all over the disk

2012-08-21 Thread Jürgen Hestermann
Am 2012-08-21 00:55, schrieb Juha Manninen: About scanning only paths specified by the user, do you really mean the user should search for pascal sources in a to-be-converted Delphi project directories, then type the directory names into a config file and then feed that file to the

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

2012-08-22 Thread Jürgen Hestermann
Am 2012-08-22 13:45, schrieb Lukasz Sokol: Recompilation when one of units/libraries was upgraded, almost always implies rebuild. Who on Earth is so trigger-happy to upgrade, rebuild and not test for regressions? This is the only sane way to get the process going - document it *as MML said

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2012-08-30 Thread Jürgen Hestermann
Am 2012-08-30 18:29, schrieb Ralf A. Quint: Pascal has evolved since Wirth's original design back in the 70s This is true. But there are two aspects of the Pascal extensions of the last years (decades) that contradict with what I would call the spirit of Pascal: 1.) Many extensions add to the

Re: [fpc-pascal] Function for checking correct file name

2012-09-14 Thread Jürgen Hestermann
Am 2012-09-12 20:51, schrieb Krzysztof: Exists any multiplatform function which check if string contains not allowed characters (like / \ on windows) for filename? The question is: Do you realy need it? I came to the conclusion that it's very hard to determine what exactly is a valid file

Re: [fpc-pascal] Function for checking correct file name

2012-09-16 Thread Jürgen Hestermann
Am 2012-09-15 23:48, schrieb Jorge Aldo G. de F. Junior: This is a security risk, because, if the function isnt almost perfect, someone could end up reading the passwords file (security.sam on windows ? whatever im not a windows programmer) or rewriting criticial files on a system. You mean

[fpc-pascal] TListBox, scroll horizontally

2012-10-04 Thread Jürgen Hestermann
Is there a way to let the user shift the content of a TListBox horizontally so that he can view the part of long strings that is clipped on the right? If the number of strings (information) exceeds the height of the TListBox there is a slider to shift vertically but when it exceeds the width

Re: [fpc-pascal] what happened to the contributed units listing?

2013-02-07 Thread Jürgen Hestermann
Am 2013-02-07 13:56, schrieb José Mejuto: My Javascript is selectivelly disabled, some trusted sites have javascript enabled (as freepascal.com) but as the sript is located in other server (cachefly.net) it was by default blocked. Yes, I have switched it off too (there are only a very few

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-28 Thread Jürgen Hestermann
Am 2013-03-01 04:41, schrieb dmitry boyarintsev: All the new strange features doesn't really matter as long as: 1) the backward compatibility is in place (and or guidelines are given how to make the code compatible with minimal efforts) 2) executable size doesn't suffer much ;) 3) the new

Re: [fpc-pascal] a proposal about with syntax

2013-03-18 Thread Jürgen Hestermann
Am 2013-03-16 07:13, schrieb Xiangrong Fang: I would like to do this: with MyClassInstance as mci, SomethingElse do begin Caption := 'A new caption'; for i := 0 to Count - 1 do mci[i] := UpperCase(mci[i]); end; That is, to add an optional as clause to the with statement so that access

Re: [fpc-pascal] Feature proposal: function-based assignment operators

2013-03-28 Thread Jürgen Hestermann
Benito van der Zander wrote: Luckily this can be written as array1[array2[i]] += 42; I would use Pascal (not C) and write inc(array1[array2[i]],42); ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Feature proposal: function-based assignment operators

2013-03-28 Thread Jürgen Hestermann
Benito van der Zander wrote: array1[array2[i]] := min(array1[array2[i]], 42); Now, you need to repeat all the array indices. Which is very ugly. So there should be an alternative syntax, similar to += : I.e.: array1[array2[i]] min= 42; Now *that* is ugly. It would take me quite a while to

Re: [fpc-pascal] Re: Feature proposal: function-based assignment operatorst

2013-03-29 Thread Jürgen Hestermann
Am 2013-03-29 10:35, schrieb Sven Barth: We value backwards compatiblity very high and this is part of it, no matter whether these c-like operators are considered good or bad... But that's not the point here. The problem has nothing to do with backward compatibility. Just the opposite. If

Re: [fpc-pascal] Re: Feature proposal: function-based assignment operatorst

2013-03-30 Thread Jürgen Hestermann
Am 2013-03-29 11:20, schrieb Mark Morgan Lloyd: What is it about Pascal programmers and their assumption that verbosity is a prerequisite to clarity? Why do you think nobody is writing text in stenography? It would be much less text to write. But we use standard languages which have a lot

Re: [fpc-pascal] Writeable typed constants - what's the point?

2009-06-18 Thread Jürgen Hestermann
should not be able to change a constant. Jürgen Hestermann ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Writeable typed constants - what's the point?

2009-06-19 Thread Jürgen Hestermann
. But now I changed my behaviour and use VAR declarations directly before the function declaration (one level higher, outside the function context). That serves the same purpose. Jürgen Hestermann. ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Name for our license

2009-06-20 Thread Jürgen Hestermann
* Free Pascal LGPL -- shortened to FPLGPL I don't like acronyms, especially if they are more than 3 letters long. Why not simply name it Free Pascal Licence? Jürgen Hestermann. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] QWord/UInt64 and Range Check Errors

2009-06-27 Thread Jürgen Hestermann
The fact that Borland regarded $FF..FF as a 2's complement representation and not as a base-16 representation of an integer is not really what I would call Pascal spirit. As a matter of fact, Borland mess would be more appropriate. :-) I always avoid such imponderabilities by using fillchar to

[fpc-pascal] Persistent blocks in Lazarus

2009-07-15 Thread Jürgen Hestermann
of working which cannot be achieved with the current temporary block mode. Thanks in advance for answers. Jürgen Hestermann. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-15 Thread Jürgen Hestermann
Zaher Dirkey schrieb: use c:\lazarus\Lazarus.exe --pcp=x:\lazarus\config Thanks for the solution! Still I am wondering why the directory Local Settings is used and not Application Data as all other applications do. Then it would be saved with roaming profiles too.

Re: [fpc-pascal] Persistent blocks in Lazarus

2009-07-15 Thread Jürgen Hestermann
Martin Friebe schrieb: Out of curiosity (because I never used this feature in any editor), what would you use it for? I used it since Turbo Pascal 5 and found it in all other Pascal IDE's (even in the text mode IDE of Free Pascal!). And it seems others would like it too (see

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
Jürgen Hestermann, how often do you change your working machine? Well, I seldom change it and I would not even need the Lazarus settings on other machines because I did not install it on these machines. But our system works the following (I don't know whether it is specific to our company

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
problems when using roaming profiles (neither losing settings nor performance impact when copying data on logon). Jürgen Hestermann. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
Therefore it would be the best of all worlds to save the Lazarus settings to the Lazarus directory. No. A sane environment shouldn't even grant you write permissions there. Then Lazarus should ask where to put the settings on installation because there are so many different configurations and

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
IMHO, that is more a problem of your novel setup than of Lazarus. I don't think so. It's a vaild setup for Windows machines since many years (see http://www.novell.com/coolsolutions/feature/3136.html). So why consider all other setups but not this one? Anyway you know now the trick:

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
Well, this is happening now, since CSIDL_LOCAL_APPDATA isn't roamed. Yes. So what's the advantage in using the Lazarus directory instead? ;) I wouldn't lose my settings on logoff. ;-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
I wouldn't lose my settings on logoff. ;-) Then don't. ;) Usually I just locked the machine overnight. But as soon as I reboot my machine (for whatever reason and at whatever day) I lose all my settings. I am not able to configurate anything different from default because each reboot would

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
Roaming profiles using auto copy/delete are not the best choice for that. For me it works fine for years ;) But not with Larazus, or? That's just the problem that it stores the settings in parts of the profile that are *not* roamed/copied. ___

Re: [fpc-pascal] Lazarus settings and roaming profiles in Windows

2009-07-16 Thread Jürgen Hestermann
Roaming profiles using auto copy/delete are not the best choice for that. For me it works fine for years ;) Then you must be the only one since everybody I know despises it. As I wrote, the company I work for uses this setup for *all* (30,000+) machines all over the world. And I doubt that

Re: [fpc-pascal] About Lazarus Program size

2009-08-17 Thread Jürgen Hestermann
yu ping schrieb: Lazarus generated exe file size is so large,Can it make small size program file? Please look here: http://wiki.lazarus.freepascal.org/Lazarus_Faq#Why_are_the_generated_binaries_so_big.3F ___ fpc-pascal maillist -

[fpc-pascal] SSH connection with cryptlib, error -32

2009-08-30 Thread Jürgen Hestermann
I have a program that connects to (cisco) network switches with telnet. It uses Ararat Synapse for the network part. Now some switches were changed to a secure SSH connection and I wanted to reflect that in my program. I used Cryplib and all the stuff as mentioned here:

  1   2   3   4   >