Re: Displaying the contents of pointers in cobol...

From: XPPROGRAMMER (saud_abraham_at_hotmail.com)
Date: 01/25/05


Date: 25 Jan 2005 13:26:09 -0800


epc8@juno.com wrote:

> 1. A pointer contains an address (or equivalent) so displaying its
> contents will be of no help to you.
>
> 2. REDEFINES simply allows different views of the same data item, for
> example both as a string of characters and as a string of digits.
This
> does not apply either.
>
> 3. It looks like you are calling a Windows API. Usually the details
of
> passing variables by reference are taken care of in the linkage
section
> and by the syntax of the CALL.
>
> AFAIK, COBOL does not have an operator which de-references a pointer,
> as you would do in C, which is something that returns what the
pointer
> is pointing at. So if you are actually passing a data structure which
> contains pointers to a routine, then you have to point them at other
> appropriate data structures yourself.
John Wrote:
thanks for your reply.

john.



Relevant Pages

  • Re: Increasing efficiency in C
    ... > You don't know where the pointer will end pointing to. ... > representation of a C string. ... Wow Dan, ... My whole point is that data structure development should ...
    (comp.lang.c)
  • Re: Strings in C are less optimal than in (say) Pascal - correct?
    ... in some sort of 'header' data structure, and that if a programmer wants to know the length of such a string, the resultant discovery is therefore very fast. ... a pointer" is generating a new string that is a slice of the existing string. ... A naive implementation would indeed be much slower in these cases, however -- of course, so would a naive implementation of repeated string concatenation in a terminator system be. ...
    (comp.lang.c)
  • Re: STL vector push_back bug????
    ... pointer to a string is stored in TCITEM::pszText, ... You should define your own data structure and copy all data, ... struct MySafeTcItem ...
    (microsoft.public.vc.stl)
  • Re: using virtual function in c
    ... Here, the machine will convert &ii (a word pointer) to a byte pointer, ... If there is only one "virtual function" for a given data structure, ...
    (comp.lang.c)
  • Re: "Mastering C Pointers"....
    ... A pointer is a kind of variable that can "point to" some object. ... has a type (pointer to int), and a value of some kind. ... You may know that you can access these integers by using array notation ... The function will take one argument, a string, and will return the length ...
    (comp.lang.c)