Recent

Author Topic: Finding coding syntax errors  (Read 3997 times)

asta90272

  • Newbie
  • Posts: 4
Finding coding syntax errors
« on: August 03, 2014, 12:59:33 am »
Hope someone can help me.
I'm a newbie on FreePascall, but used Borland Pascal since mid '80s. 
How do I find the line that caused this compiler message.

     test.pas(131,4) Error: Incompatible types: got "untyped" expected...
     test.pas(140,1) Fatal: There were 2 error, etc.

I'm not worried about the actual error, just do not know how to find it.
 
I'm using FreePascall 2.6.4 from FreePascal IDE.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Finding coding syntax errors
« Reply #1 on: August 03, 2014, 01:12:17 am »
clicking (or double clicking in my case) the error should open the file at the correct position of the error. sometimes the cursor is placed on the command that raised the error but most of the times it is placed on the next command.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Finding coding syntax errors
« Reply #2 on: August 03, 2014, 09:52:28 am »
How do I find the line that caused this compiler message.

     test.pas(131,4) Error: Incompatible types: got "untyped" expected...

If clicking or double-clicking on the Message does not jump to the offending line for some reason, the error position is indicated by the numbers in parentheses after the source file name. So here the error is in test.pas just before character 4 of line 131.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Finding coding syntax errors
« Reply #3 on: August 03, 2014, 02:15:26 pm »
Please notice this, guys:
I'm using FreePascall 2.6.4 from FreePascal IDE.
I don't really remember since I haven't used the text mode IDE for a long time, but still the compiler always shows message in the format: <file path> "(" <line number> "," <column number> ")" <compiler message>, it's just a matter of mapping those variables to your file.

asta90272

  • Newbie
  • Posts: 4
Re: Finding coding syntax errors
« Reply #4 on: August 03, 2014, 03:46:34 pm »
Thanks so much!!! I thought it was trivial, and am so glad I don't have to reinstall something.

 

TinyPortal © 2005-2018