>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  PLURAL
Libraries

PLURAL

PLURAL

Name


      PLURAL

Purpose


      Plural function: returns 's' if arg > 1, else ''.

Category


Calling Sequence


      c = plural(n,s,p)

Inputs


      n = a number. in
      s = optional item to return if singlular (def=''). in
      p = optional item to return if plural (def='s'). in
      c = returned item (def: '' if n is 1, else 's'). out'

Keyword Parameters


Keywords


        /NUMBER means return n as a word: no,one,two,...
          s may be given to change the returned word for 1.

Outputs


Common Blocks


Notes


      Notes: Useful for generating numeric related messages.
      Examples: print,strtrim(n,2)+' cow'+plural(n)
        print,strtrim(n,2)+' '+plural(n,'ox','oxen')

Modification History


      R. Sterner, 1995 Dec 14
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 1995, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us