Utility functions / vCard utility functions (IMPORT FGL VCard) |
Converts a VCPerson record to a vCard string representation vCard.
format_person( person VCPerson ) RETURNING result STRING
This function converts a record defined with the VCPerson type, to a string representing a vCard.
IMPORT FGL VCard MAIN DEFINE p VCard.VCPerson LET p.FirstName = "Hans" LET p.LastName = "Mustermann" LET p.email[1].VALUE = "hans@nomail.com" LET p.phone[1].TYPE = "HOME" LET p.phone[1].number = "+49 123 4567 8901" LET p.phone[2].TYPE = "WORK" LET p.phone[2].number = "+49 123 9876 5431" DISPLAY VCard.format_person(p.*) END MAIN
Output:
BEGIN:VCARD VERSION:3.0 N:Hans;Mustermann;;; FN:Hans Mustermann TEL;TYPE=HOME:+49 123 4567 8901 TEL;TYPE=WORK:+49 123 9876 5431 EMAIL:hans@nomail.com END:VCARD