Re: if statement / isinteger

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 27 2011 - 20:23:55 MST

The function returns a logical value [True / False]

        function isinteger (
                arg
        )
        return_val [1] : logical <====

Usage

if ( isinteger(a) ) then ; <<< This is if (True) then
      a=a+1
end if

Why do you have "do a=a+1"
Where did that come from

On 1/27/11 8:13 PM, Paula Doubrawa Moreira wrote:
> Hi-
> Can anyone help me use if statements and logical structures together?
>
> how do I use the function "isinteger" with an if statement?
>
> I've tried:
>
> *if ( isinteger(a) ) then*
> *do a=a+1*
> *end if*
>
> *if ( isinteger(a) .eq. "True") then*
> *do a=a+1*
> *end if*
> *
> *
> I've tried moving things around in the if statement and even though I
> know that a is an integer, it's not recognizing my if statement and
> executing the command!
>
> Thanks!
>
> --
> *Paula Doubrawa Moreira*/
> /Graduate Student - Research Assistant
> International Arctic Research Center
> University of Alaska Fairbanks
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 27 20:24:00 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST