Runtime Error 215 : What is it? 
Author Message
 Runtime Error 215 : What is it?

Hi there,

I've written this program that plots 3D-axis and should then plot 3D-
structures. However, when it draws all three axis, when the z-axis reaches
the top of my screen the compiler gives runtime error 215. At the bottom of
my screen it just draws and draws, even though some points lie outside the
range of the screen.
So my question is : what is the runtime error 215?

Teus

Greetings                                  *      *                *
 from Wouter van Reeven               *                 *
 alias "Teus"                                                      *



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?


Quote:
> I am using Turbo Pascal 7.0  (BP7 is larger than TP7 I think), but I can
> not list any Run-Time error codes (only all the other error codes).  
> Perhaps I deleted a file after I installed.    Guess its time to
> reinstall anyhow.

It is in the main help file.

Ctrl-F1, R, U, Enter, R, Enter.

(You get to it via RunError)

.splitbung
--
* TQ 1.0 * The 'Just So Quotes'.
Arthur C. Clarke's Law :
It has yet to be proven that intelligence has any survival value.



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:



> > I am using Turbo Pascal 7.0  (BP7 is larger than TP7 I think), but I can
> > not list any Run-Time error codes (only all the other error codes).  
> > Perhaps I deleted a file after I installed.    Guess its time to
> > reinstall anyhow.

> It is in the main help file.

> Ctrl-F1, R, U, Enter, R, Enter.

> (You get to it via RunError)

I get nothing using RunError (it just goes back to the top of the current
topic).   I have however had other problems with help as there is some
stuff I can't get to because it shows some error that there is too many
topics (I am only using a 286 with 640K).


Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:

>Hi there,
>So my question is : what is the runtime error 215?

Hmmm, my Turbo book only goes up to 209 in explaining things

205 is a floating point overflow unless they changed that to runtime
215, Your program if mixing reals and integers throughout the program
would have a tendency to do that.....

Hmm flummoxed

Tim...

   "Whoever would overthrow the liberty
   of a nation must begin by subduing
        the freeness of speech."
            Ben Franklin



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:


>>So my question is : what is the runtime error 215?
>205 is a floating point overflow unless they changed that to runtime
>215, Your program if mixing reals and integers throughout the program
>would have a tendency to do that.....

215:arithmetic overflow (BP7): help message reads as follows:

 Arithmetic overflow error |                
 Reported by statements compiled with {$Q} when
 an integer arithmetic operation caused an    
 overflow or the result was outside the      
 supported range.                            

Max



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:


> >Hi there,
> >So my question is : what is the runtime error 215?
> Hmmm, my Turbo book only goes up to 209 in explaining things
> 205 is a floating point overflow unless they changed that to runtime
> 215, Your program if mixing reals and integers throughout the program
> would have a tendency to do that.....
> Hmm flummoxed
> Tim...

usually happens with long-integers. like converting a longint to a string.

var
        mean : longint;
        block : word;
        tempstr : string;

begin
        mean := block * 128;
        str( mean, tempstr );  {this is where it gives the error for me}
        write( tempstr );
end.

you must have Overflow checking on for the error to occur. with out that
check you'll just get a wrong answer.



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:


> >Hi there,

> >So my question is : what is the runtime error 215?

> Hmmm, my Turbo book only goes up to 209 in explaining things

> 205 is a floating point overflow unless they changed that to runtime
> 215, Your program if mixing reals and integers throughout the program
> would have a tendency to do that.....

> Hmm flummoxed

> Tim...

>    "Whoever would overthrow the liberty
>    of a nation must begin by subduing
>         the freeness of speech."
>             Ben Franklin


time error 215 as: Arithmetic Overflow Error.

Bob Hansen



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:

> [ much snipped regarding error 215]>
> usually happens with long-integers. like converting a longint to a string.

> var
>         mean : longint;
>         block : word;
>         tempstr : string;

> begin
>         mean := block * 128;
>         str( mean, tempstr );  {this is where it gives the error for me}
>         write( tempstr );
> end.

I do not believe that error 215 could be raised by this conversion to a string; it will be raised in the line
        MEAN := BLOCK * 128

if BLOCK*128 is too large for a WORD.
--
p. rowntree
Departement de chimie, Universite de Sherbrooke, Sherbrooke, Quebec, Canada



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:


> > [ much snipped regarding error 215]>
> > usually happens with long-integers. like converting a longint to a string.

> > var
> >         mean : longint;
> >         block : word;
> >         tempstr : string;

> > begin
> >         mean := block * 128;
> >         str( mean, tempstr );  {this is where it gives the error for me}
> >         write( tempstr );
> > end.

> I do not believe that error 215 could be raised by this conversion to a string; it will be raised in the line
>    MEAN := BLOCK * 128
> if BLOCK*128 is too large for a WORD.

trust me it did. besides BLOCK is a word and MEAN is a longint. The error
went away when I included

var
        temp : longint

begin
        temp := 128;

why don't you try that routine out with overflow checking on. you'll see.



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?



Quote:

>> I do not believe that error 215 could be raised by this conversion to a
>string; it will be raised in the line
>>      MEAN := BLOCK * 128

>> if BLOCK*128 is too large for a WORD.

>trust me it did. besides BLOCK is a word and MEAN is a longint. The error
>went away when I included

>var
>       temp : longint

>begin
>       temp := 128;

It would.  The type of MEAN is irrelevant, at the stage when BLOCK*128
is executed.  You want either  
MEAN := longint(BLOCK)*128   or   MEAN := BLOCK*longint(128) .  

Check the manuals on the evaluation of expressions - at least roughly,
"A op B" is done by extending the shorter of A,B to the length of the
longer, and assuming that that length will suffice for the result of
"op".  If necessary, the length will then be adjusted for the
assignment.  Use the {$R+} state.
--



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime Error 215 : What is it?

Quote:
> > >So my question is : what is the runtime error 215?

> > Hmmm, my Turbo book only goes up to 209 in explaining things

> > 205 is a floating point overflow unless they changed that to runtime
> > 215, Your program if mixing reals and integers throughout the program
> > would have a tendency to do that.....
> usually happens with long-integers. like converting a longint to a string.

> var
>         mean : longint;
>         block : word;
>         tempstr : string;

> begin
>         mean := block * 128;
>         str( mean, tempstr );  {this is where it gives the error for me}
>         write( tempstr );
> end.

> you must have Overflow checking on for the error to occur. with out that
> check you'll just get a wrong answer.

   And the way to avoid it in your problem is to cast the Word to
LongInt before the computation is done:

  Mean := LongInt(Block)*128;



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. runtime error 215

2. FPC: runtime error 215 - lack in documentation....

3. RunTime error 215?

4. runtime error 215

5. STR procedure and runtime error 215

6. What is DOS ERROR 215

7. What is ERROR 215

8. Error #215 Arithmetic overflow, where it shouldn′t occur(?)

9. Heap Overflow Error - runtime error 203

10. Confusing runtime error porting to TPW

11. Runtime Error 105

12. runtime error

 

 
Powered by phpBB® Forum Software