[fpc-pascal] exiting a program more friendly way

2006-06-23 Thread Pianoman
Hi, I'd like to ask whether is it possible to exit program in case of runtime error 202 for example more nicely than with message runtime error 202 at a1d456d5621blablabla For example: writeln('starting to divide:'); writeln(2/0); and I don't want mi program to stop with runtime error but I

[fpc-pascal] Re: nano-x

2006-06-23 Thread Jeff Pohlmeyer
I am trying to convert nano-X.h to a pas file but I get some errors. This is 2 of them. I cannot se what the problem is, can anyone give me a hint. h2pas is not perfect, some things it doesn't understand, and other C things simply don't make sense in Pascal. So you will probably end up

Re: [fpc-pascal] Modify XML Document

2006-06-23 Thread dhkblaszyk
Felipe, Have a look at the lazdocfrm.pas file located in lazarus/ide. for a working example. Darius Hello, I am trying to use the units XMLRead, XMLWrite, DOM to modify the structure of a XML file. Reading the XML file is very easy and works very well, but I am lost about how to modify

Re: [fpc-pascal] exiting a program more friendly way

2006-06-23 Thread Michael Van Canneyt
On Fri, 23 Jun 2006, Pianoman wrote: Hi, I'd like to ask whether is it possible to exit program in case of runtime error 202 for example more nicely than with message runtime error 202 at a1d456d5621blablabla For example: writeln('starting to divide:'); writeln(2/0); and I don't want mi

Re: [fpc-pascal] exiting a program more friendly way

2006-06-23 Thread Adrian Maier
On 23/06/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Fri, 23 Jun 2006, Pianoman wrote: Hi, I'd like to ask whether is it possible to exit program in case of runtime error 202 for example more nicely than with message runtime error 202 at a1d456d5621blablabla For example:

[fpc-pascal] overflow checking

2006-06-23 Thread Пётр Косаревский
Just a question about programming practice: How can I disable overflow checking for a couple of operations? I use something like that: {$DEFINE CHECKINGS} {$IFDEF CHECKINGS} --- of course, this block can be much bigger {$R+,S+,Q+,V+} {$ELSE} {$IMPLICITEXCEPTIONS ON} {$R-,S-,Q-,V-}

Re: [fpc-pascal] overflow checking

2006-06-23 Thread Alexey Pavluchenko
Hello Пётр, Friday, June 23, 2006, 11:59:26 AM, you wrote: [skip] ПК Is there an easier way? ПК Like ПК {$SAVE Q} {$Q-} e:=f+g; {$LOAD Q} ПК so that it will fit one line? {$IFOPT Q+} {$Q-} {$DEFINE Q_SWITCHED} {$ENDIF} (* do some stuff here *) {$IFDEF Q_SWITCHED} {$Q+} {$UNDEF Q_SWITCHED}

Re[2]: [fpc-pascal] overflow checking

2006-06-23 Thread Пётр Косаревский
Thank you for advices! Probably, I'll stick to global definitions. It seems, that {$IFOPT} doesn't help conserve space when you have to switch checks somewhat often, while greatly helps write code fragments for injection. (A line starting with {$Q-}, then simple expression, ending with some

Re: [fpc-pascal] exiting a program more friendly way

2006-06-23 Thread Tony Pelton
please trim your posts. thanks, Tony On 6/23/06, Pianoman [EMAIL PROTECTED] wrote: Hi, I'd like to ask whether is it possible to exit program in case of runtime error 202 for example more nicely than with message runtime error 202 at a1d456d5621blablabla For example: writeln('starting to

Re: [fpc-pascal] exiting a program more friendly way

2006-06-23 Thread A.J. Venter
On Friday 23 June 2006 15:58, Tony Pelton wrote: please trim your posts. Please do not top-post. Thanks A.J. :) Anyway, to answer the original question - look in the miscelaneous section of the contributed units list on www.freepascal.org for unit errormsg, if the link no longer works (I

Re: [fpc-pascal] Modify XML Document

2006-06-23 Thread Felipe Monteiro de Carvalho
Thank you very much guys, you saved me just a few hours before presenting my work. I will try to add the things I learned to the wiki. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org