From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db9560332371a98b,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.193.129 with SMTP id ho1mr18952774pbc.8.1340109443847; Tue, 19 Jun 2012 05:37:23 -0700 (PDT) Path: l9ni68619pbj.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.fortran,comp.lang.ada Subject: does modern Fortran have membership test similar to this Ada 2012 feature? Date: Tue, 19 Jun 2012 07:37:18 -0500 Organization: Aioe.org NNTP Server Message-ID: Reply-To: nma@12000.org NNTP-Posting-Host: KdJUrTuvv3Zv/s8pPxNluw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-19T07:37:18-05:00 List-Id: Fortran experts: I do not know Fortran well. I did google search, but too many false hits due to the nature of the search. I thought I ask here, since someone who is an expert in the language would know right away the answer to this question without any effort. Does Fortran have set membership test? Similar to this description below, I copied from 2012 Ada introduction by John Barnes. -- start quote ------ In previous versions of Ada, membership tests allowed one to see whether a value was in a range or in a subtype, thus we could write either of if D in 1 .. 30 then if D in Days_In_Month then but we could not write something like if D in 1 | 3 | 5 | 6 ..10 then This is now rectified and following "in" we can now have one or more of a value, a range, or a subtype or any combination separated by vertical bars. Moreover, they do not have to be static. ----- end quote ---------------- Any thing like the above build-in Fortran 90, 2003, etc... ofocurse one can write a function to do the above, but wanted to check if it is build in. Syntax is not important, just the concept. thanks, --Nasser ps. I added comp.lang.ada, just FYI, and may be someone there might know also.