(j3.2006) Get_Command_Argument

Bill Long longb
Mon Dec 12 15:57:18 EST 2011



On 12/12/11 2:23 PM, Van Snyder wrote:
> Is this legal?
>

It is with the compilers I use.

>    use ISO_C_Binding
>    integer(c_int) :: Num
>    character(len=127,kind=c_char) :: Value
>    call get_command_argument ( num, value )
>
> What if c_int /= kind(0)?
>
No, not then.

> What if c_char /= kind('A')?
>

No, not then either.

> Should it have been legal in the latter two cases?
>

I don't think so.  We very often require "default" kinds and it would be 
tedious to everywhere insert "or kind=c_int", etc.  Since it is very 
unlikely that these inequalities would be true for a currently relevant 
compiler, it also seems unhelpful.

Cheers,
Bill


>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3

-- 
Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101





More information about the J3 mailing list