× 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.


  • Subject: RE: Prototyping printf()
  • From: "Sims, Ken" <KSIMS@xxxxxxxxxxxxxxxx>
  • Date: Fri, 6 Oct 2000 12:15:21 -0400

Hi Eric -

>The main reason I went through this exercise was to try to simulate
>some semblance of object orientation by having externally defined data
>Structures for the object and then creating instances of them in
>memory with pointers to other objects contained within... I have some
>of this working :-) But after Barbara's warning that this is not
>supported behavior I will have to figure something else out :-(

If I am understanding properly what you are trying to do: there is no way to
force your externally described data structures to be aligned on a 16-byte
boundary.  Therefore your character fields that you are using for storing
pointers may not be aligned on a 16-byte boundary; which means that any
pointer that you store in one of those non-aligned fields is immediately
invalidated and no longer usable as a pointer.

>It would be nice to be able to define a pointer data type externally
>:-)

That would get around your problem, but ... if pointers could be defined in
database files, that would mean that data management would have to actually
be able to store pointers in a database file and maintain the tag bits.  I
don't recall enough off the top of my head about storing pointers on disk to
know if this is feasible.

My first thought was to have a "valid pointer" attribute flag like
null-capable fields, but it only took about 15 seconds to realize that
wouldn't work.  It would be possible to touch either the field without
touching the flag or vice versa, allowing an invalid pointer to be marked as
valid.  The "valid pointer" flags have to be stored where they are not
addressable except directly through the hardware, just as the tag bits for
pointers in memory are not directly addressable.

Ken
Southern Wine and Spirits of Nevada, Inc.
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.