############################################################################ # # File: lastname.icn # # Subject: Procedure to produce last name # # Author: Ralph E. Griswold # # Date: June 21, 2000 # ############################################################################ # # This file is in the public domain. # ############################################################################ # # Produces the last name of a name in conventional form. Obviously, it # doesn't work for every possibility. # ############################################################################ procedure lastname(s) local line, i line := trim(s) line ?:= tab(upto(',')) # Get rid of things like " ... , Jr." line ? { every i := upto(' ') tab(\i + 1) return tab(0) } end