[futurebasic] Re: [FB] C++ Operator?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1998 : Group Archive : Group : All Groups

From: tedd@...
Date: Tue, 29 Dec 1998 10:47:13 -0500
>Does anyone know what "->" translates to, as in the following...
>
>if (curdebt -> db.mortgage) {...etc.
>
>Thanks!
>
>
>
>John


John:

First, this is one of the reason I don't like writing in C.

Second, the statement--

  curdebt -> db.mortgage

--appears in the C language as well as in C++.

Third, the overall statement is a way to store/retrieve a member (a
variable) to/from a structure (a record) which is a member of another
structure (a record).

Fourth, "curdept" is a pointer to the original structure.

Fifth, the "db.mortgage" is a way to store/retrieve a member (mortgage)
to/from another structure (db).

Another way of writing this in C -- which may be easier to understand is:

   (*curdebt).db.mortage

So, what you have a a pointer to a record (curdebt) that contains a member
which is another record (db) which also contains a member (mortgage).

I think the way to write this in FB (if you were using a handle of
curdebt&) is:

   curdebt&..db.mortgage

Or, if you were just using a pointer it would be.

   @curdebt&.db.mortage

However, I leave it to the real experts of FB to confirm/deny my observations.

tedd


___________________________________________________________________
<mailto:tedd@...>	               http://sperling.com/