ana |
Table of contents
ProcedureANA ( AN or A ? ) CHARACTER*(*) FUNCTION ANA ( WORD, CASE ) AbstractReturn the correct article "a" or "an" used to modify a word and return it capitalized, lower case, or upper case. Required_ReadingNone. KeywordsUTILITY WORD DeclarationsIMPLICIT NONE CHARACTER*(*) WORD CHARACTER*(*) CASE Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- WORD I is a word that should be modified by "a" or "an". CASE I 'U', 'L', or 'C' to specify capitalization of ANA. The function returns the correct article, 'A' or 'AN', needed to modify a word WORD, appropriately capitalized. Detailed_InputWORD is any English word for which you want to write the correct phrase "a(an) response(answer)". The case of the letters of word do not matter. Leading white space in word is ignored. The characters " and ' are ignored. Thus ''' apple '' ' and '"apple"' and ' apple' and 'apple' are all treated as the same word. CASE is a character that describes how the value returned in ANA should be capitalized. The rules are: 'U' --- ANA is returned in all caps ( A, AN ) 'C' --- ANA is returned capitalized ( A, An ) 'L' --- ANA is returned lower case ( a, an ) The case of CASE does not matter. Any value other than those specified result in ANA being returned in all lower case. Detailed_OutputThe function returns the correct indefinite article needed to modify the word contained in WORD. ANA should be declared to be CHARACTER*(2) (or CHARACTER*(N) where N > 1) in the calling program. ParametersNone. ExceptionsError free. 1) If the uppercase value of CASE is not 'U', 'C' or 'L', it shall be treated as 'L'. FilesNone. ParticularsThis routine allows you to construct grammatically correct phrases when you need to modify a word by an indefinite article. Using the pronunciations contained in the Webster's Ninth Collegiate Dictionary, the phrase ANA(WORD, CASE) // ' ' // WORD will be grammatically correct. ExamplesSuppose you wished to construct one of the messages 'a new file' 'an existing file' and that the NEW/EXISTING word was in the variable WORD. Then you could write MESSAGE = ANA( WORD, 'L' ) // ' ' // WORD // ' file ' CALL CMPRSS ( ' ', 1, MESSAGE, MESSAGE ) RestrictionsNone. Literature_References[1] Merriam-Webster (Ed.), "Webster's Ninth New Collegiate Dictionary," 10th edition, 1990. Author_and_InstitutionJ. Diaz del Rio (ODC Space) B.V. Semenov (JPL) W.L. Taber (JPL) E.D. Wright (JPL) VersionSPICELIB Version 1.1.3, 24-NOV-2021 (JDR) Edited the header to comply with NAIF standard. SPICELIB Version 1.1.2, 28-FEB-2008 (BVS) Corrected the contents of the $Required_Reading section. SPICELIB Version 1.1.1, 22-SEP-2004 (EDW) Added Copyright section. SPICELIB Version 1.1.0, 18-JAN-2001 (WLT) Made SCLK an "an" word. SPICELIB Version 1.0.0, 29-NOV-1995 (WLT) |
Fri Dec 31 18:35:58 2021