Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

my pascal program has runtime error 216

Posted on 2000-03-19
3
Medium Priority
?
1,704 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 49

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

WooCommerce is becoming the most powerful e-commerce plugin for Wordpress. And why not. The platform comprises of numerous core plugins that may come in handy, powerful options to make your website development task much easier.
What monsters are hiding in your child's room? In this article I will share with you a tech horror story that could happen to anyone, along with some tips on how you can prevent it from happening to you.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

618 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