Power Programming Languages

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only

The integer POINTER statement

By Archive User posted Mon December 16, 2013 10:26 PM

  

Originally posted by: Ka_Lin


Let's distinguish integer POINTER from the Fortran 90 POINTER statement, as the latter has nothing to do with variable addresses.

POINTER----(--int_pointer--,--pointee--)

int_pointer is the name of an integer pointer variable. pointee is a variable name or array declarator. The statement specifies that the value of the variable int_pointer is to be used as the address for any reference to pointee.

For example,
 
INTEGER :: a, b
POINTER (p, i)
     
IF (a <> 0) THEN
  p = LOC(a)
ELSE
  p = LOC(b)
ENDIF

The LOC(X) intrinsic procedure returns the address of X that can then be used to define an integer POINTER.


#Fortran-Cafe-for-AIX
#C/C++andFortran
0 comments
1 view

Permalink