Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> error 56 integer constant error pp 323</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Error 56                   Integer Constant Error                    pp 323

 Source:  Compiler

 Cause:   Integer constant exceeds range of -32768 to +32767.
          Real whole number outside range of -32768 to +32767 does not
          have trailing decimal point and zero.

 Remedy:  Examine the statement ahead of the error cursor for the above
          condition.


 ----------------------------------------------------------------------------


 Example:
       CONST
          BugVar :  Integer = -32768;   { Value = $8000  - Gives Error 56   }
          OKVar  :  Integer =  $8000;   { Value = -32768 - No compile error }

          Real1  :  Real    =  32768;   { Wrong   - decimal and 0 missing   }
          Real2  :  Real    =  32768.0; { Correct - trailing decimal and 0  }


       VAR
          IntVar :  Integer;            { Declare an integer variable       }
          Numbers:  Array [0..40000]    { Wrong - out of range              }
                    of Byte;

       BEGIN
          IntVar := -32768 ;            { Legal value causes Error 56       }
          IntVar :=  $8000 ;            { Legal value does not give error   }
       END.

See Also: Integer

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson