[J3] Revision of "inquiry function" definition is needed
Robert Corbett
rpcorbett at att.net
Fri Nov 22 20:23:08 EST 2019
Your quotation is not what I wrote.
Every intrinsic function and every
function in an intrinsic module has
a class that is explicitly specified
as part of the description of the
function. One of the classes is
inquiry function. If the class
specified for a function is
inquiry function, it is an inquiry
function. If the class specified
for a function is not inquiry
function, it is not an inquiry
function.
The definition currently provided
is more a description of why a
function might be classified as
an inquiry function than a
definition. It would probably
be better to make that
definition a note.
Bob Corbett
> On Nov 22, 2019, at 3:03 PM, Steven G. Kargl <kargl at troutmask.apl.washington.edu> wrote:
>
> Yes, the Fortran standard defines the functions
> in class inquiry function in the specification
> of those functions. What I find as circular in
> the definition you suggested is that "inquiry
> function" is defined in terms of itself.
>
> "An inquiry function is in the class inquiry function."
>
> This isn't too informative.
>
> --
> steve
>
>
>> On Fri, Nov 22, 2019 at 02:33:18PM -0800, Robert Corbett wrote:
>> It is not at all circular. Every
>> specification of an intrinsic
>> function or a function in an
>> intrinsic module explicitly
>> specifies the class of the
>> function.
>>
>> Bob Corbett
>>
>>> On Nov 22, 2019, at 2:07 PM, Steven G. Kargl <kargl at troutmask.apl.washington.edu> wrote:
>>>
>>> Yes, that would work although it does seem a bit circular.
>>>
>>> --
>>> steve
>>>
>>>> On Fri, Nov 22, 2019 at 01:31:25PM -0800, Robert Corbett wrote:
>>>> A better definition might be
>>>>
>>>> An intrinsic function or function
>>>> in an intrinsic module whose
>>>> class is Inquiry function.
>>>>
>>>> Bob Corbett
>>>>
>>>>>> On Nov 22, 2019, at 12:31 PM, Steven G. Kargl via J3 <j3 at mailman.j3-fortran.org> wrote:
>>>>>>
>>>>>> On Fri, Nov 22, 2019 at 02:59:15PM -0500, Vipul Parekh wrote:
>>>>>> On Fri, Nov 22, 2019 at 1:51 PM Steven G. Kargl via J3
>>>>>> <j3 at mailman.j3-fortran.org> wrote:
>>>>>>>
>>>>>>> ..
>>>>>>> IEEE_SUPPORT_DENORMAL is a "function in an intrinsic module" and
>>>>>>> 17.11.49 (page 460) indicates "Class. Inquiry function". In the
>>>>>>> above valid Fortran code, the inquiry function has no arguments,
>>>>>>> so does it have a result?
>>>>>>> ..
>>>>>>
>>>>>> For the purposes of such a consideration, this function should perhaps
>>>>>> be viewed as having a dummy argument X which shall be of type real. It
>>>>>> may be a scalar or an array?
>>>>>>
>>>>>> IEEE_SUPPORT_DENORMAL (X)
>>>>>> 17
>>>>>> 18 1 Description. Query subnormal number support.
>>>>>> 19 2 Class. Inquiry function.
>>>>>> 20 3 Argument. X shall be of type real. It may be a scalar or an array.
>>>>>> 21 4 Result Characteristics. Default logical scalar.
>>>>>> 22 5 Result Value.
>>>>>> 23 Case (i): IEEE_SUPPORT_DENORMAL (X) has the value true if
>>>>>> IEEE_SUPPORT_DATATYPE (X) has
>>>>>> 24 the value true and the processor supports arithmetic
>>>>>> operations and assignments with subnormal
>>>>>> 25 numbers (biased exponent e = 0 and fraction f ?= 0, see
>>>>>> ISO/IEC/IEEE 60559:2011, 3.2) for real
>>>>>> 26 variables of the same kind type parameter as X;
>>>>>> otherwise, it has the value false.
>>>>>>
>>>>>> Vipul Parekh
>>>>>
>>>>> Yes, I know the intent of 17.11.49 when IEEE_SUPPORT_DENORMAL() is
>>>>> invoked without its optional argument. The point is that by definition
>>>>> (see 3.89) it seems that IEEE_SUPPORT_DENORMAL() is not an inquiry
>>>>> function because it does not have one or more arguments. The definition
>>>>> provides no leeway for missing optional arguments.
>>>>>
>>>>> Perhaps, a better definition is along the lines
>>>>>
>>>>> inquiry function
>>>>> intrinsic function, or function in an intrinsic module, whose result
>>>>> is a characteristic of the processor, and if one (or more) argument
>>>>> is present, then the result depends on the properties of one or more of
>>>>> its arguments instead of their values
>>>>>
>>>>>
>>>>> --
>>>>> Steve
>>>>
>>>
>>> --
>>> Steve
>>
>
> --
> Steve
More information about the J3
mailing list