× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think you will have to supply some information:

- What are you trying to achieve?
- Why do you think you need a linked list?
- Why do you think you need pointers to process this list?
(And while you're at it: What is wrong with using a file in QTEMP?)

There are several ways to handle lists of information in RPG (arrays,
multiple occurrence data structures and, yes, files).  Arrays and MODS
usually have a predefined size limit.  When you don't want to define the
size at compile time, you will have to do your own memory housekeeping; in
that case you will have to deal with pointers.

A list is a linked list when elements contain one or more links to other
elements.  These links don't have to be pointers (in the technical sense);
in an array they could be indexes to other elements; in a MODS they could be
indexes to other occurrences; in a file they could be keys to other records.

Joep Beckeringh


----- Original Message -----
From: <SCarter@rsrcorp.com>
To: <rpg400-l@midrange.com>
Sent: Tuesday, January 08, 2002 9:03 PM
Subject: Help a pointer Newbie out...


> I searched the archives and the FAQ for information on using pointers to
> linked lists
> and I did not find anything useful to ME...
> that having been said can some one give me an example of using pointers
for
> linked lists
> I have the classic list problem I know what type of data I need but i
don't
> know how much.
> I could write the data out to a file in QTEMP and just process the file
but
> I did not want to do
> that unless I can't wrap my brain around this pointer thing in a
reasonable
> amount of time.
>
> I want to be able to store this information in a list and then reprocess
> the list how would I
> do this with pointers...
> D LDADS           DS
> D  CusKeyErr        14     28
> D  RefErr           29     38
> D  MsgCode          39     45
> D  ErrElmAry        46     93
> D  ErrMsgAry        94    261





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.