# # KEHOME/src/aka.icn # Richard H. McCullough Aug/11/2005 Aug/15/2014 Mar/28/2015 #birthname,marriedname isa name # official names #nickname,prefername,othername isa name # #r_aka is relation with # tmode = gdbm, relKey = "$1", # relLabel = (pid, birthname, prefername, nickname, marriedname..., othername...), # relType = (person, name, name, name, name, name), # automatic = ISU, # meaning = procedure_aka; ## meaning = { ## $1 is person with pid = $1; ## $1 has birthname = $2, has prefername = $5, has nickname = $4; ## $1 has marriedname += $3, has othername += $6; ## }; invocable "procedure_aka" procedure procedure_aka(rname,nvtab) #=================================== local cache local d1,d2,d3,d4,d5,d6 local p,q case rname of { "r_aka": { # initialization #--------------# d1 := unparse(nvtab["$1"]) # $1 = pid d2 := unparse(nvtab["$2"]) # $2 = birthname d3 := unparse(nvtab["$3"]) # $3 = prefername d4 := unparse(nvtab["$4"]) # $4 = nickname d5 := set(nvtab["$5"]) | set() # $5 = marriedname d6 := set(nvtab["$6"]) | set() # $6 = othername # meaning #-------# q := new_concept(d1,"person") p := new_person(q) # $1 isa person put_nv(q,NVPHRASE(["pid","=",q])) # $1 has pid=$1 put_nv(q,NVPHRASE(["birthname","=",d2])) put_nv(q,NVPHRASE(["prefername","=",d3])) put_nv(q,NVPHRASE(["nickname","=",d4])) put_nv(q,NVPHRASE(["marriedname","+=",d5])) put_nv(q,NVPHRASE(["othername","+=",d6])) } # end "r_aka" } # end case rname end #