Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is pointer error in rpg IV?

Answer Posted / szeke

As i know pointers are only simple memory adresses stored in variables. There are many situation they can be used, not only passing parameters. APIs from C, dynamically allocated variables, structures.

A %TRIMR can be a pointer in the original field instead of building another instance of it. Working with orbital buffers, parsing them, break into separated fields, from another ILE language or module can be received and send by a number of pointers instead of copy the value.

Doing anything with a pointer value doesn't point to the correct location is a pointer error. All the data types represent pointers anyway, but they maintained by the compiler, not by the programmer. To forget freeing unused pointed memory areas is another type of error. The use of pointers can cause such errors like invalid data, or memory leaks, since the compiler has no idea what we store on that variable, it must believe we're right. In java, the compiler strictly checks an array out of bound pointer operation, in C++ i have the right to browse the whole memory from a simple a[2] defined array by adressing it as a[12345]. Also no expensive type checkings, so the performance is better.

I can erase a value, or don't even initialize it in the memory but the pointer will still exist and pointing into a non-defined value.

The instruction pointer is also a pointer, can be manipulated by GOTO jumps, or Subs, OOP programming languages are just abstract definitions over the same thing, basically every procedure will be called by its pointer in the memory, determined by compiler or the user, in compile time or run-time... It is called procedure pointer. To point into a variable instead of a PROC is another serious error...

So, what is the question exactly?

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you read changed records backward in subfile?

1146


Explain this error: "all record formats for externally-described file abcd ignored or dropped due to error; file ignored."?

1411


which cl command can be used at program execution to redirect the file named in an rpg program?

1245


how to toggle between single line and multi - line display of a particular record in a subfile?

1898


when would you prefer logical file than opnqryf?

2569


what is the clp command to access a query/400?

2232


What is RETURN CURSER LOCATION in subfile?

1630


explain the purpose of keep and assume keywords?

1878


WHAT is STORED PROCEDURE CONCEPT IN AS400 WITH EXAMPLE?

2578


is their a difference in cobol400 for the release 5.2 and 6.1 at the as400.

2616


how you get the relative record in a subfile in which cursor is located?

1161


how many levels are there in a physical file?

1864


when should I use method get, and when should I use method post in my cgis?

1182


when are the referential constraints executed?

1166


How Many Specs Are There In Rpg & Which Are They?

1148