home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / APPS / WORDPERF / WPMPRT11.ZIP / WPMPRT.TXT < prev    next >
Encoding:
Text File  |  1991-10-04  |  2.9 KB  |  63 lines

  1. FILE   : wpmprt.WPM
  2. HEADING: convert to WP characters
  3.  
  4. {;} TX.wpm - Convert WPMPRT DOS text file in WP to characters~
  5. {;}          copyright 1991, L.Dunn, Micro Management Systems~
  6. {DISPLAY ON}
  7. {Home}{Home}{Home}{Up}{;}              got to top of document~
  8.  
  9. {LABEL}START~
  10.    {ASSIGN}1~~{;}                      clear {VAR 1}~
  11.    {ASSIGN}2~~{;}                      clear {VAR 2}~
  12.    {ASSIGN}3~~{;}                      clear {VAR 3}~
  13.    {ASSIGN}4~~{;}                      clear {VAR 4}~
  14.    {ASSIGN}9~~{;}                      clear {VAR 9}~
  15.  
  16.    {Search}[{Search}{;}                search for open bracket~
  17.    {Block}{Right}{;}                   block the following char code~
  18.    {Macro Commands}31{Enter}{;}        save in {VAR 1}~
  19.    {Block}{Right}{;}                   block next character~
  20.    {Macro Commands}32{Enter}{;}        save -- should be colon~
  21.    {IF}"{VAR 2}"!=":"~{;}              if not colon~
  22.       {GO}START~{;}                       not a compose char~
  23.       {END IF}
  24.    {Block}{Right}{;}                   character set number~
  25.    {Macro Commands}33{Enter}{;}        store in {VAR 3}~
  26.    {IF}"{VAR 3}"<"0"|"{VAR 3}">"9"~{;} numeric digit?~
  27.       {GO}START~{;}                       if not, no compose~
  28.       {END IF}{;}                         try again~
  29.  
  30.    {LABEL}NUM1~{;}                     get character set number~
  31.       {Block}{Right}{;}                   block next char~
  32.       {Macro Commands}39{Enter}{;}        save in {VAR 9}~
  33.       {IF}"{VAR 9}"<"0"|"{VAR 9}">"9"~{;}   if not a number~
  34.          {GO}NONUM1~{;}                      try next character~
  35.          {END IF}
  36.       {ASSIGN}3~({VAR 3}*10)+{VAR 9}~{;}   add to char set number~
  37.       {GO}NUM1~{;}                        try for another digit~
  38.  
  39.    {LABEL}NONUM1~{;}                   got char set number~
  40.       {IF}"{VAR 9}"!=","~{;}           if not comma~
  41.          {GO}START~{;}                    not a compose cmd~
  42.          {END IF}
  43.  
  44.       {Block}{Right}{;}                block next character~
  45.       {Macro Commands}34{Enter}{;}     store in {VAR 4}~
  46.       {IF}"{VAR 4}"<"0"|"{VAR 4}">"9"~{;} is not numeric digit?
  47.          {GO}START~{;}                    not compose~
  48.          {END IF}
  49.  
  50.    {LABEL}NUM2~{;}                     get character number~
  51.       {Block}{Right}{;}                   block next character~
  52.       {Macro Commands}39{Enter}{;}        store in {VAR 9}~
  53.       {IF}"{VAR 9}"<"0"|"{VAR 9}">"9"~{;}   not numeric digit~
  54.          {GO}NONUM2~{;}                      got number~
  55.          {END IF}
  56.       {ASSIGN}4~({VAR 4}*10)+{VAR 9}~{;}       add to number~
  57.       {GO}NUM2~{;}                        get next char~
  58.  
  59.    {LABEL}NONUM2~{;}                   got character number~
  60.    {Block}{Search Left}[{Search Left}{;}block left~
  61.    {Left}{Del}y{;}                     include [ and delete~
  62.    {^V}{VAR 3},{VAR 4}{Enter}{;}       compose the character~
  63.    {GO}START~{;}                       try for another~