Re: [fpc-pascal] Pascal postscript reading library
Felipe Monteiro de Carvalho schrieb: Hello, I did some googling, and I think there is none, but just in case ... does anyone know a pascal library to read postscript files? Preferably open source. Liberal licensing (linking to proprietary code) is indispensable. If not then there will be one in a couple of months =) I need to interpret information from a .ps file and generate output based on that. PS is really complex, it's a full programming language after all. I would consider a Ghostscript wrapper. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Trim db-fieldnames, or not?
On 19/04/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > That is just sick! > > > It is. > Courtesy of MS-Access users... That was the first to support it, AFAIK. > (although access uses [] instead of "", as far as I remember) That's is sick! And yes, MS-Access uses the square brackets. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Pascal postscript reading library
On Sun, Apr 20, 2008 at 6:42 AM, Florian Klaempfl <[EMAIL PROTECTED]> wrote: > PS is really complex, it's a full programming language after all. I would > consider a Ghostscript wrapper. The problem is that you have to buy it for non-GPL projects, but thanks a lot for the tip, I will evaluate if their price make it worth it. A very big problem of their selling system is that they don't have publicly available prices, and they are the sole holders of the copyright, so, if they sudenly decide to raise their prices for me, I'm completely locked to 1 vendor. thanks, -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] The reason why linus torvalds hate-pascal
Lets hear what the old fathers told us... when Linus Torvalds was still running around the Christmas tree Niklaus Wirth, Algorithms and Data Structures 1985 (Oberon version: August 2004, afaik first published 1975 in German) (Regarding pointers and goto statements..) ...This phenomenon of power and flexibility being intimately coupled with the danger of misuse is well known in programming, and it particularly recalls the GOTO statement. Indeed, if the analogy between program structures and data structures is to be extended, the purely recursive data structure could well be placed at the level corresponding with the procedure, whereas the introduction of pointers is comparable to the use of GOTO statements. For, as the GOTO statement allows the construction of any kind of program pattern (including loops), so do pointers allow for the composition of any kind of data structure (including rings). Kernighan , Ritchie, The C Programming Language 1978 page 62 C provides the infinitely-abusable goto statement, and labels to branch to. Formally the goto is never necessary and in practice it is almost always easy to write code without it. We have not used goto in this book. Nonetheless , we will suggest a few situations where goto's may find a place. The most common use is to abandon processing in some deeply nested structure, such as breaking out of two loops at once. The break statement cannot be used directly since it leaves only the innermost loop . Although we are not dogmatic about a matter, it does seem that goto statements should be used sparingly, if at all. Mit freundlichen Grüßen Markus Greim ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] The reason why linus torvalds hate-pascal
mm wrote: Zaher Dirkey a écrit : I hate exit when i try to improve a procedure some code if (b) then exit; some code for long procedures i cant notice exit here and add some resource or memory uses AnObject := TAnObject.Create; try some code if (b) then exit; some code finally AnObject.Free; end; Now Exit leave the procedure without freeing "AnObject". We need a new Exit keyword to jump to Finally section (I do not think Abort is useful here). But AnObject is freed. If ever Exit had the behaviour you describe, we would have a big problem. True, the object is freed and the procedure exited. Now it would be nice to jump to the finally clause and continue in the procedure. Sigh, wishfull thinking. Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] The reason why linus torvalds hate-pascal
C provides the infinitely-abusable goto statement, and labels to branch to. Formally the goto is never necessary and in practice it is almost always easy to write code without it. We have not used goto in this book. Nonetheless , we will suggest a few situations where goto's may find a place. The most common use is to abandon processing in some deeply nested structure, such as breaking out of two loops at once. The break statement cannot be used directly since it leaves only the innermost loop . Although we are not dogmatic about a matter, it does seem that goto statements should be used sparingly, if at all. I agree, the goto should only be used to IMPROVE code readability. About break. I would like to see an implementation of Break(x) where x is the number of loops to break out of. Correction: I would not like this, I would LOVE it. Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] The reason why linus torvalds hate-pascal
I am not like break(x) it also make improvement my procedure was sensitive, i must count how many loop i have in, and i must care if i added a new loop around the code that looped (hmm bad english). On Sun, Apr 20, 2008 at 7:21 PM, Andreas Berger <[EMAIL PROTECTED]> wrote: > > > > > > C provides the infinitely-abusable goto statement, and labels to branch > to. Formally the goto is never necessary and in practice it is almost always > easy to write code without it. We have not used goto in this book. > > Nonetheless , we will suggest a few situations where goto's may find a > place. The most common use is to abandon processing in some deeply nested > structure, such as breaking out of two loops at once. The break statement > cannot be used directly since it leaves only the innermost loop > > . > > Although we are not dogmatic about a matter, it does seem that goto > statements should be used sparingly, if at all. > > > > > I agree, the goto should only be used to IMPROVE code readability. > > About break. I would like to see an implementation of Break(x) where x is > the number of loops to break out of. > Correction: I would not like this, I would LOVE it. > > Andreas > > > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Trim db-fieldnames, or not?
Graeme Geldenhuys wrote: On 19/04/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > That is just sick! It is. Courtesy of MS-Access users... That was the first to support it, AFAIK. (although access uses [] instead of "", as far as I remember) That's is sick! And yes, MS-Access uses the square brackets. with quoted identifiers you can do whatever you want. One of the examples I use why you don't want to use them is: SELECT "select" FROM "from" WHERE "where" and "and" BETWEEN "between" and "and" HAVING "having" ORDER BY "order by" Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] The reason why linus torvalds hate-pascal
On Sunday 20 April 2008 19:21, Andreas Berger wrote: > About break. I would like to see an implementation of Break(x) where > x is the number of loops to break out of. > Correction: I would not like this, I would LOVE it. Oh, another Adaism trying to creep into Pascal...? :D But let me revisit your proposal: Of course, break with such a "number of level" argument breaks your code (hence the name?), once you add another loop somewhere around it. In that case I'd rather go with goto. At least there's a label and a definite target to jump to. The alternative is the named loop as in Ada, which makes it possible to break out of more than just one loop, but wouldn't have the hassles of a "where does this 'break (3)' lead us?". At least you name the loop you want to abandon at the point of "exit" and you can look up the label in the code, instead of counting the number of levels (and maybe even missing one). Sorry, but as much as you might think, you'd love this; if you really need something like that, rather use "goto" or throw a bloody exception. Vinzent. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal