[TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 Hello! I was looking for the answer here but I couldn't find: [url]http://www.freepascal.org/port.var[/url] . 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'."). [code]Free Pascal Compiler version… Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by pritaeas end . should be end. (remove the space) Not sure about the first error. Could it be triggered by the $N switch error ? Look for {$N} and remove it (at the top). Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 Thanks! I got rid of the first problem - it was because Dev-Pascal treats integer as longint and shortint as integer. I removed the spacebar before dot. Now it looks like this [code] Infos; Resume end end; end.[/code] But the error is the same :-(. Greetings! Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 OK, I got rid of those two problems. Now I've got new errors to debug :D. line number 881 contains: [code]200: window(1,1,80,25); ClrScr;[/code] errors: [code]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:\dev-pas\program\main.pas trc.pas(1,2) … Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by pritaeas Correct. Labels must start with a character, not a number. Add a prefix to the 200, like: label200: and change the references in the code. Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 Thanks! I changed twice in the code 200 into lab200. Now I've got the following errors: [code]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:\dev-pas\trackal\trc.pas trc.pas(1,2) Warning: Unsupported switch $N trc.pas(401,5) Note: Local variable EM1 not used… Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by Duoas Whitespace between the keyword [b]end[/b] and the period is not significant. Perhaps you should post more code? It is hard to diagnose what is wrong. With FPC, you must be sure to have the [inlinecode]{$goto on}[/inlinecode] directive enabled. I don't think that the $N directive is used in FPC -- the FPC uses native floating-point types --… Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 All results of "200", "label" and "goto": [code]732: procedure axesimu; 733: label 0200; 744: case vv of 747: 3: Goto 0200; 881: 200: window(1,1,80,25); ClrScr; 884: procedure TwoAxles; 885:label 100; 1025: if (zn='N') or (zn='n') then goto 100;[/code] Without any changes: [code]Free Pascal Compiler version 1.0.6… Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by FlamingClaw Turbo pascal 7.0. Labels' identifier can be numbers from 0 to 9999,and any name that can be an identifier... Free Pascal A label is a name for a location in the source code to which can be jumped from another location with a Goto statement. Labels can be[B] digit sequences[/B] or [B]identifiers[/B]. The [B]-Sg[/B] or [B]-Mtp[/B] switches … Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by Duoas [b]johnyjj2[/b] if you really want help, [i]please post your code[/i]. What you've listed so far is nonsense. Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 Thanks! In other words I can use those names like 0200 or 200. I added {$GOTO ON} but it didn't help. [QUOTE=FlamingClaw;939032]The [B]-Sg[/B] or [B]-Mtp[/B] switches must be specified before labels can be used.[/QUOTE] I checked that pdf to which you gave me link. There is nothing more written there than what you wrote. I looked for "-Sg&… Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by FlamingClaw Listen my code! [code=pascal] program solution; {$GOTO ON} Label 12,yeep; Begin GoTo 12; WriteLn('Hello');{no} 12:Begin WriteLn('I''m just jumping to the next goal');{out} GoTo yeep;{jumps to the yeep label} End; WriteLn('Hm....');{no} yeep:WriteLn('press enter...');{out} ReadLn; End. [/… Re: [TurboPascal, Dev-Pas, Free-Pascal] problem with longint and unexpected end of file Programming Software Development by johnyjj2 Thank you :-). I checked settings of Free Pascal compiler and it is set "allow label and goto" in the default configuration. I changed all "0200"s into "200"s and it works, combined with {&GOTO ON}. Greetings! Jumps into code on program end Programming Software Development by Gammatech I have an ongoing TurboPascal development that jumps into one of the units code on … Re: Jumps into code on program end Programming Software Development by pty [QUOTE=Gammatech;124059]I have an ongoing TurboPascal development that jumps into one of the units code on … Program not working Programming Software Development by HelpWanted2115 Ok, so I got a program to do in TurboPascal but it's not doing the one of the requirements … Re: Reading multiple files in pascal Programming Software Development by Ghost_Buster … is not there or any I/O error occurs. In TurboPascal and Delphi this is achieved using the compiler directive {$I… Re: QBasic help needed. Programming Software Development by gwmorris …, lamer QBasic that is only interpreted. You can also get TurboPascal, which might be a better choice for this type of… Re: Where to start with Delphi? Programming Software Development by Dervish1 … number of free alternatives to Pascal. Since Borland has sold TurboPascal and the new versions are far from cheap, I'm… Re: SQL and automatic update of tables Programming Software Development by Morten Brendefu … and the need of exception handling. All done with Delphi/TurboPascal logic. Indeed a very useful link as it gives ideas… Re: Alternative to Turbo C++ ? Programming Software Development by vmanes To be fair, the thread got a revial 6 months ago. Even one year is hardly necro-thread. I would say TurboC was legendary, as was TurboPascal. They brought industrial strength programming tools to the public for very affordable prices. Re: 106 error in my program in pascal Help! Programming by Schol-R-LEA … a 'string expression expected' error](http://putka.upm.si/langref/turboPascal/01AA.html), but honestly, if your professor has you using… Re: Jumps into code on program end Programming Software Development by Daaave First question is: What version of Turbo Pascal? This could make a great difference. For instance, in ver 6 and earlier, the editor would only hold 64K of text, limiting the size of programs, and causing the need to break up code into sometimes non-intuitive chunks. Also, the order of entry/exit of units is like this: First unit initializes,… Re: Jumps into code on program end Programming Software Development by Gammatech Thanks Daaave, I'm running turbo pascal version 7. My program has been broken up into quite a few units (16 bespoke plus Graph,Dos & CRT) the modified version of CRT is used to avoid crashes on faster machines. Eight of the units have specific initialisation routines so setting breakpoints enables me to sort out the order that they … Re: Jumps into code on program end Programming Software Development by juul send me a code on how to add numbers in delphi Re: Jumps into code on program end Programming Software Development by juul [B][COLOR=red]i am using delphi 5 and need to know how i can write a program to add two numbers[/COLOR][/B] Re: Jumps into code on program end Programming Software Development by Terry Robinson Here is another thing which might be of use. I have seen instances where a program jumps to unexpected code as it is shutting down. For instance, Delphi may the OnActivate event of an open form even when the program is terminating. Apparently, the form needs to become active before it can be closed. There is an easy way to block that kind of … Re: Jumps into code on program end Programming Software Development by pty [QUOTE=juul;379965]send me a code on how to add numbers in delphi[/QUOTE] [code] 1+2 [/code] HOPE THIS HELPS LOVE PTY Re: Program not working Programming Software Development by pritaeas What's the problem? Re: Program not working Programming Software Development by HelpWanted2115 It's suppose to add all the prices together, but once i go more than 2 prices for 2 products, it gives me incorrect numbers, im trying to get a grand total each time a product is entered for eg. Ham-500,Chicen-500 Grand Total=1000 or Ham-500,Chicken,200,Rice-300...Grand Total=1000 but it just wont add the third price with the previously entered …