- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello -
I looked thru the Fortran handbooks, and to my surprise I could not find the intrinsic I need.
I just need a LOGICAL function for comparing two arrays. Of course I could easily code one up,
but that may not be as fast as a machine-coded intrinsic, if one exists.
The arrays would usualy be integer types. The purpose is to compare a record to see if if already exists somewhere before storing it.
Unfortunately, this doesNOT work:
integer*1 A(8,8), B(8,8)
if (A == B)then
! they are equal
else
! they are not equal
endif
It says it expects a scalar there.
Any ideas? Thanks !
I looked thru the Fortran handbooks, and to my surprise I could not find the intrinsic I need.
I just need a LOGICAL function for comparing two arrays. Of course I could easily code one up,
but that may not be as fast as a machine-coded intrinsic, if one exists.
The arrays would usualy be integer types. The purpose is to compare a record to see if if already exists somewhere before storing it.
Unfortunately, this doesNOT work:
integer*1 A(8,8), B(8,8)
if (A == B)then
! they are equal
else
! they are not equal
endif
It says it expects a scalar there.
Any ideas? Thanks !
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Study the ANY intrinsic, maybe that will help.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page