Turbo Pascal/Help
< Turbo PascalThis page is dedicated to helping Turbo Pascal 7 or 3.1 (for Windows) Programmers. To post questions, just go into edit and post them. They will be answered.
Click on the link below to go to my page and edit and paste the questions there or edit and paste your questions here.
Drnoitall.hello 02:52, 20 March 2007 (UTC)Drnoitall.hello
Questions Here: After recovering from a hard drive crash, I installed Borland Pascal 7.0 from the original floppies. I had used the former installation for years without trouble and have a large number of programs I need to use. Now, BP.EXE restarts the BIOS, although the needed files DPMI16BI.OVL and RIM.EXE are also present in C:\DOS\BIN. (TURBO.EXE will run, but I need the memory of Protected Mode.) .
There is one difference: the floppies I had available loaded MSDOS v 6.2, while I earlier ran v 6.22.
Please help!
i wrote this program for my programmin class and i cannot figure out why i keep receiving the same error message
i get the error 4 duplicate identifier for the variable "triangle" which is a string.
program triangle; {Change the Program name to something else like triangles} uses crt; const skip=' '; var side1:integer; side2:integer; side3:integer; triangle:string; begin clrscr; writeln('Enter first side: '); readln(side1); writeln('Enter second side: '); readln(side2); writeln('Enter longest side(if applicable): '); readln(side3); if (side1=side2) or (side2=side3) or (side1=side3) then triangle:='isosceles' else if (side1<>side2) and (side2<>side3) and (side3<>side1) then triangle:='scalene' else if (side1=side2) and (side2=side3) then triangle:='equilateral'; writeln('The triangle is ',traingle); {Wrong spelling of triangle You wrote traingle instead of triangle} if (triangle='isosceles') and (sqr(side1)+sqr(side2)=sqr(side3)) then writeln('The triangle is also a right triangle.') else writeln('The triangle is not a right triangle.'); if (triangle='scalene') and (sqr(side1)+sqr(side2)=sqr(side3)) then writeln('the triangle is also a right triangle.') else writeln('the triangle is not a right triangle.');
readln; end. (The preceding unsigned comment was added by 98.196.206.181 (talk • contribs) 22:19, 23 October 2007)
- it seems that you can't have a variable with the same name as the programs name so Change the Programs Name To something else like Triangles Alaayman 22:55, 2 February 2010 (UTC) -