home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / parsomat.zip / exampl12.pom < prev    next >
Text File  |  2001-07-15  |  2KB  |  59 lines

  1. ;
  2. ;   NOTE:  A quick-reference summary of POM commands appears in QUICKREF.POM
  3. ;
  4. ;          This POM file uses the APPEND command to demonstrate its function.
  5. ;          If you study this POM file, you'll notice that (at least for this
  6. ;          application) it would be a lot simpler to do the appending in the
  7. ;          OUTEND commands.
  8. ;
  9. ;-------------------------------------------------------------------------------
  10. ;
  11. ;   Get first name (from first character to first slash)
  12. ;
  13. PARSE    first   $FLINE   ""   "/"
  14. ;
  15. ;   Get last name (from first slash to second slash)
  16. ;
  17. PARSE    last    $FLINE "/" "2*/"
  18. ;
  19. ;   Append first and last name (with a space between them) and add a comma
  20. ;
  21. APPEND   name    first " " last ","
  22. ;
  23. ;   Get street address and add a comma to the end
  24. ;
  25. PARSE    street  $FLINE  "2*/"  "3*/"
  26. APPEND   street  street  ","
  27. ;
  28. ;   Get city and state, then combine them with a comma in between
  29. ;
  30. PARSE    city    $FLINE  "3*/"  "4*/"
  31. PARSE    state   $FLINE  "4*/"  "5*/"
  32. APPEND   cs      city  ", "  state
  33. ;
  34. ;   Get phone number, but leave in the slashes (the "I" means "include")
  35. ;
  36. PARSE    phone   $FLINE  "5*/" "6*/" "I"
  37. ;
  38. ;   Get the amount owed (the "" means "to the last character")
  39. ;
  40. PARSE    amount  $FLINE  "7*/" ""
  41. ;
  42. ;   Output address, followed by a blank line
  43. ;
  44. OUTEND   |{name}
  45. OUTEND   |{street}
  46. OUTEND   |{cs}
  47. OUTEND   |
  48. ;
  49. ;   Output the phone number and the amount owed
  50. ;
  51. OUTEND   |{phone}${amount}
  52.  
  53. ;
  54. ;   Insert a dashed separator line between two blank lines
  55. ;
  56. OUTEND   |
  57. OUTEND   |-----------------------------------------------------
  58. OUTEND   |
  59.