Re: IF statements
- From: dpb <bozarth.d@xxxxxxxxx>
- Date: 29 May 2007 10:41:38 -0700
On May 29, 9:46 am, Beliavsky <beliav...@xxxxxxx> wrote:
On May 29, 10:35 am, smurray444 <smurray...@xxxxxxxxx> wrote:
Hey guys,
I have a grid, and using an IF statement, I want to trigger a series
of commands if the variable 'result' is within the grid cell
'square1'. I am able to achieve this using an IF statement for if a
value is equal to, less or greater than a given number for example,
but how would I create a statement to trigger the rest of the code if
'result' is simply present within the cell?
I am not sure I understand your question, but maybe you are looking
for a construct such as
if (x >= xlow .and. x <= xhi) then
! do something
end if
Given the discussion of a square, I'm wondering if it would be more
like
if((x >= xlow .and. x <= xhi) .and. (y >= ylow .and. y <= yhi)) then
! do something
end if
although I, like Gus, wonder whether the meaning of "simply present"
is somehow different than the above test...
.
- Follow-Ups:
- Re: IF statements
- From: smurray444
- Re: IF statements
- References:
- IF statements
- From: smurray444
- Re: IF statements
- From: Beliavsky
- IF statements
- Prev by Date: Re: strange arguments passing problem (from vba to fortran dll)
- Next by Date: Re: I am looking for library from Lahey Fortran 95 v.5.5
- Previous by thread: Re: IF statements
- Next by thread: Re: IF statements
- Index(es):
Relevant Pages
|