Overloaded Operators#
OPERATOR(.AND.) – Specify Dimension Extent#
Synopsis |
|---|
|
Class |
|---|
Generic elemental function. |
Description |
|---|
Create a dimension argument that combines an extent with its unlimited status. Use the result as the right operand of |
Arguments |
|---|
|
|
Return |
|---|
|
Example |
|---|
use, non_intrinsic :: nc4f
implicit none (type, external)
type(dimension_type) :: time
integer :: length
logical :: is_unlimited
length = 24
is_unlimited = .true.
time = "time" .dim. (length .and. is_unlimited)
|
OPERATOR(.ATT.) – Construct an Attribute#
Synopsis |
|---|
|
Class |
|---|
Generic function. |
Description |
|---|
Construct an |
Arguments |
|---|
|
|
Return |
|---|
|
Example |
|---|
use, non_intrinsic :: nc4f
implicit none (type, external)
type(attribute_type) :: units
character(len=*), parameter :: unit_name = "K"
units = "units" .att. unit_name
|
OPERATOR(.DIM.) – Construct a Dimension#
Synopsis |
|---|
|
Class |
|---|
Generic elemental function. |
Description |
|---|
Construct a limited dimension from an extent, or a limited or unlimited dimension from an argument created by |
Arguments |
|---|
|
|
|
Return |
|---|
|
Example |
|---|
use, non_intrinsic :: nc4f
implicit none (type, external)
type(dimension_type) :: latitude
integer :: length
length = 181
latitude = "latitude" .dim. length
|
OPERATOR(.EXISTS.) – Test an Error Result#
Synopsis |
|---|
|
Class |
|---|
Pure elemental function. |
Description |
|---|
Return true when an |
Arguments |
|---|
|
Return |
|---|
|
Example |
|---|
use, non_intrinsic :: nc4f
implicit none (type, external)
type(error_type) :: error
if (.exists. error) print *, error%msg
|
OPERATOR(/=) – Compare Model Objects#
Synopsis |
|---|
|
Class |
|---|
Generic elemental function. |
Description |
|---|
Return true when two attributes, dimensions, or variables are not equal. |
Arguments |
|---|
|
|
Return |
|---|
|
Example |
|---|
use, non_intrinsic :: nc4f
implicit none (type, external)
type(dimension_type) :: observed, expected
if (observed /= expected) print *, "Values differ."
|
OPERATOR(==) – Compare Model Objects#
Synopsis |
|---|
|
Class |
|---|
Generic elemental function. |
Description |
|---|
Return true when two attributes, dimensions, or variables are equal. |
Arguments |
|---|
|
|
Return |
|---|
|
Example |
|---|
use, non_intrinsic :: nc4f
implicit none (type, external)
type(dimension_type) :: reference, candidate
if (reference == candidate) print *, "Values match."
|