Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #39553

Re: Extendable structure with inspection

From "Alex McDonald" <blog@rivadpm.com>
Newsgroups comp.lang.forth
Subject Re: Extendable structure with inspection
Date 2015-06-04 09:11 +0100
Organization A noiseless patient Spider
Message-ID <mkp14s$u5e$1@dont-email.me> (permalink)
References <f17afc56-0260-499e-8314-7495c6ce449a@googlegroups.com> <12e4210f-7337-4d68-8ad3-cc544f7c0de4@googlegroups.com> <48671374-2e21-491e-8f2a-572f4c55be7c@googlegroups.com>

Show all headers | View raw


on 04/06/2015 04:54:11, Raimond Dragomir wrote:

> 
> What did you accomplished? You still need the structure name (not the
> object name) to associate the following field with it.
> You need to do this: Ob POS X
> A much cleaner and simpler way is just to prefix the field names with
> the structure name! For example: Ob POS.X or Ob POS->X or anything you
> like.
> 
> I would have been impressed if you was able to do that:
> Ob X
> 
> This was the real discussion in some other thread: associate the field
> of the structure with the object!
> 
>

OBJECT POS X suggests that OBJECT really isn't an object at all; it's an
area of memory over which the structure POS is being applied to get the
variable at offset X. I'm not quite sure whay you would want OBJECT X in
such a case. For most uses, defining and knowing the offset of X is
rather pointless since the class (and any objects derived from it)
encapsulates the variable. Althought there are similarities, structures
and classes are not necessarily the same, and classes may not always be
supersets of structures.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-02 13:29 -0700
  Re: Extendable structure with inspection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-03 06:02 +0000
    Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-03 08:27 -0700
  Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-03 11:30 -0700
    Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-03 20:54 -0700
      Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-04 09:11 +0100
        Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-04 04:43 -0700
          Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-04 20:21 +0100
            Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-04 23:23 -0700
              Re: Extendable structure with inspection "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-06-05 03:40 -0400
              Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-05 15:31 +0100
                Re: Extendable structure with inspection Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-06-05 08:48 -0700
                Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-05 18:10 +0100
                Re: Extendable structure with inspection albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-06-06 10:46 +0000
                Re: Extendable structure with inspection hughaguilar96@gmail.com - 2015-06-05 17:53 -0700
                Re: Extendable structure with inspection albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-06-06 10:56 +0000
                Re: Extendable structure with inspection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-06 16:00 +0000
                Re: Extendable structure with inspection hughaguilar96@gmail.com - 2015-06-06 19:35 -0700
                Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-07 10:51 +0100
                Re: Extendable structure with inspection Bernd Paysan <bernd.paysan@gmx.de> - 2015-06-08 23:24 +0200
                SIZE RfD: Re: Extendable structure with inspection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-09 07:56 +0000
                Re: Extendable structure with inspection "Alex McDonald" <blog@rivadpm.com> - 2015-06-09 12:09 +0100
                Re: Extendable structure with inspection Bernd Paysan <bernd.paysan@gmx.de> - 2015-06-09 23:25 +0200
              Re: Extendable structure with inspection "Elizabeth D. Rather" <erather@forth.com> - 2015-06-05 07:53 -1000
                Re: Extendable structure with inspection hughaguilar96@gmail.com - 2015-06-05 17:34 -0700
      Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-05 00:40 -0700
  Re: Extendable structure with inspection humptydumpty <ouatubi@gmail.com> - 2015-06-10 12:16 -0700

csiph-web