| |
You are here: Experts > Computing/Technology > Cobol > Cobol > cobol
Expert: David Nelson - 11/6/2009
Question Is there any, pointer concept in cobol if yes please tell me it in detail with an example ?
Answer COBOL does support POINTERs.
They can be associated with Data in either FILE, LINKAGE or a STORAGE section.
Also, you can have FUNCTION POINTER similar to C++ Function pointers and Procedure Pointer which works the same way.
The use of pointers is not real simple, but it is straight forward. Consult your language reference manual for your specific compiler implementation for what is supported and sample code.
The data pointer can be set by: [SET pointer-name to ADDRESS OF Storage-variable-name] and related syntax.
Data pointers are commonly used. I have never used a 'function pointer' in COBOL.
David
Add to this Answer Ask a Question
|
|