[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