[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

my pascal program has runtime error 216

Posted on 2000-03-19
3
Medium Priority
?
1,751 Views
Last Modified: 2008-02-26
I wrote a pascal program that is used to store member and book of a book shop
I am now writing a procedure to save and load files in the program that use a single link list to store

There is no problem on saving to a file from the link list records
but when I load the saved file to the link list there is an runtim error 216 occur

do anybody can help me ? please give me your email address so that I can send the source code to you to have a look
0
Comment
Question by:adrianmak
3 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 150 total points
ID: 2633304
Error code 216 means that there is a general protection fault.

Here's what the Pascal help says.

 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 ³ General Protection fault  ³
 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

This error results if you try to access memory that is not legal for your
application to access. The operating system halts your application and tells
you that a general protection (GP) fault occurred, but your system does not
crash.

The following practices cause GP faults:

 * Loading constant values into segment registers

 * Performing arithmetic operations on segment registers of selectors

 * Using segment registers for temporary storage

 * Writing to code segments

 * Accessing memory beyond the local address space given to your application

 * Derefencing nil pointers

I think you have to look through your code one more time, or maybe try to run it on another computer. If it works ok there, it could be something wrong with the setup on your PC.

Regards
Batalf

0
 

Author Comment

by:adrianmak
ID: 2634755
I have a procedure that is open an existing file for read in

assign(memberfile,'member.txt')
reset(memberfile)

{ read(member,newnode^.id,newnode^.name);

..
..
..
..

writeln(newnode^.id,newnode^.name);



when I run the program
error 104: file not open for input

what wrong ?
0
 
LVL 50

Expert Comment

by:dbrunton
ID: 2639054
That's really another question you are asking.

What I am suspecting is that you have declared memberfile to be a file of text.  In which case using reset means that you can only open the file for reading.  You are trying to write to the file hence the error.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Applications for our next round of the Experts Exchange Scholarship Contest are starting to roll in. It made us wonder what our past winners are up to these days. Here's a look at what four winners experienced with the contest and what they're doing…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question