Subject: NULL( ) Initialization J3/02-151r1 From: Kurt W. Hirchert (Meeting 160) 01 Mar 2002 =========== The Problem =========== Probably no rational person would rename the NULL intrinsic to something else or rename some other function to be NULL, but it might happen in someone's test suite. Consider the following: MODULE procedures INTRINSIC null EXTERNAL mynull END MODULE procedures MODULE confusion USE procedures, ONLY: foobar=>null, null=>mynull END MODULE confusion If you then USE confusion in some program unit, it is clear that in the executable statements of that program unit, you would use the name FOOBAR to reference the NULL intrinsic function, and any uses of the name NULL would reference the function MYNULL. What do you use for pointer initialization in your declarations? 1. The BNF is hard-coded for you to use NULL( ). 2. Most of the text says you should reference the NULL intrinsic function (i.e., use FOOBAR( )). 3. One spot in the text even asserts that by writing NULL( ) you will reference the NULL intrinsic function (even though that normally references MYNULL in this scoping unit). It would appear that this is a contradiction that needs to be fixed. The approach chosen in this paper is to change the declarations to use the same syntax that is used in the executable statements. ===== Edits ===== "NULL ( )" => "" in each of the following places: 42:43 44:16,23 45:19 66:19 68:33 84:15,42 85:1,3 250:14 3:21+ Is this a Fortran 95 incompatibility (because of the BNF changes) or not (because we remain compatible with the text assertions)? 66:20 Move to 66:18- 66:19+ Insert " R507a is C505a (R507a) shall be a reference to the NULL intrinsic function with no arguments " 68:34 Delete final sentence of paragraph. 404:10 OK? no action needed? - end -