Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

[TurboPascal, Dev-Pas, FreePascal] problem with longint and unexpected end of file


  • Please log in to reply
15 replies to this topic

#13 johnyjj2


    CC Newcomer

  • Just Joined
  • PipPip
  • 23 posts

Posted 10 August 2009 - 09:24 PM

Those files contain dots but compiler showed names of the files in this way - without dots. Greetings!
  • 0

#14 PP85


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 16 June 2013 - 04:15 AM


I was looking for the answer here but I couldn't find: h ttp://w ww.freepascal.org/port.var -> Free Pascal - Porting Turbo Pascal Applications.

I've got old code in Turbo Pascal and I try to run it on Dev-Pascal 1.9.2. (I also tried Lazarus application, but there was "Error. Project raised exception class 'External: SIGSEGV'.").

Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Win32 for i386
Compiling f:\intern\26turb~1\program\main1.pas
main1.pas(1,2) Warning: Unsupported switch $N
Compiling main2.pas
main2.pas(1,2) Warning: Unsupported switch $N
main2.pas(308,15) Error: call by var parameters have to match exactly: Got LONGINT expected SMALLINT
main2.pas(645,76) Warning: Comment level 2 found
main2.pas(843,3) Warning: Comment level 2 found
main2.pas(643,2) Fatal: Unexpected end of file
I look at these two lines:
308: InitGraph(ster,tryb,path);
52: ster:integer=VGA;
I changes line 52.
52: ster:smallint=VGA;
I also tried:
52: ster:shortint=VGA;
But neither of them can help and there's all the time the same error: Got LONGINT expected SMALLINT.

And the other thing, that is "unexpected end of file".
End of the file is as follows:

end .
How to get rid of those two errors?





What way you solve first problem related with LongInt?

I tried change on ShortInt and SmallInt but no change.

  • 0

#15 JasonKnight


    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 312 posts
  • Location:Keene, NH
  • Programming Language:C, C++, JavaScript, Delphi/Object Pascal, Pascal, Assembly, Others

Posted 19 June 2013 - 02:42 PM

Helping much more without seeing what you are working on is kinda tough... Snippets are cute, but really don't give the whole picture.

Of course, any Pascal program using numbered labels and GOTO probably needs a complete rewrite due to the ineptitude of the original developer... or just a lazy port from BASIC back in the day.

... actually... I didn't think ANY version of Turbo Pascal, even 7, supported labels that start with a number. As to the typecasting issue, there's probably more going on there in the code we're not seeing.

Edited by JasonKnight, 19 June 2013 - 02:43 PM.

  • 0
The only thing about Dreamweaver that can be considered professional grade tools are the people promoting it's use.

#16 PP85


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 23 June 2013 - 10:59 AM


Problem solved.
I changed a little in the declarations and compiler no longer disposed errors.

I was sure that it was previously declared and it was bad. Apparently crept a subtle bug.


Thanks for your willingness to help.

Post completed.

  • 0

Also tagged with one or more of these keywords: pascal

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download