NYSIIS: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: used a better method of detecting post-nominal letters.) |
m (→{{header|REXX}}: changed a comment.) |
||
Line 622: | Line 622: | ||
nysiis: procedure; arg x; x=space(x); x=translate(x,,','); w=words(x) |
nysiis: procedure; arg x; x=space(x); x=translate(x,,','); w=words(x) |
||
lw=word(x,words(x)) /*pick off the last word in name list. */ |
lw=word(x,words(x)) /*pick off the last word in name list. */ |
||
titles = 'ESQ JNR JR SNR SR' /* [↓] last word a |
titles = 'ESQ JNR JR SNR SR' /* [↓] last word a post─nominal word? */ |
||
if w\==1 then if pos('IL',lw)==0 then /*disallow IL as Roman#.*/ |
if w\==1 then if pos('IL',lw)==0 then /*disallow IL as Roman#.*/ |
||
if pos(.,x)\==0 |, /*Sr. Jr. Esq. ... ? */ |
if pos(.,x)\==0 |, /*Sr. Jr. Esq. ... ? */ |