home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / DRI-archive / roche / WS4DOT.TXT < prev    next >
Internet Message Format  |  2009-12-11  |  3KB

  1. From: "Salle Arobase" <salle.arob...@ville-rochefort.fr>
  2. Newsgroups: comp.os.cpm
  3. Subject: WS4 Dot Commands
  4. Date: Wed, 20 Aug 2003 13:57:54 +0200
  5. Organization: Ville de Rochefort
  6. Lines: 141
  7. Message-ID: <bhvn8b$5bp$1@news-reader5.wanadoo.fr>
  8. Reply-To: "Salle Arobase" <salle.arob...@ville-rochefort.fr>
  9. NNTP-Posting-Host: apoitiers-106-2-1-186.w193-253.abo.wanadoo.fr
  10. X-Trace: news-reader5.wanadoo.fr 1061380171 5497 193.253.213.186 (20 Aug 2003 11:49:31 GMT)
  11. X-Complaints-To: abuse@wanadoo.fr
  12. NNTP-Posting-Date: 20 Aug 2003 11:49:31 GMT
  13. X-Priority: 3
  14. X-MSMail-Priority: Normal
  15. X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
  16. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
  17.  
  18. WS4DOT.TXT  by Emmanuel ROCHE
  19. ----------
  20.  
  21. How do you get/display/filter/remove all the "dot commands" in a
  22. WS4 file?
  23.  
  24. First, you make a  WS4 file  containing all  the (documented...)
  25. dot commands (see "Appendix G" of your favorite big binder).
  26.  
  27. An hypothetical program could then produce the following:
  28.  
  29. List of WS4 dot commands inside file DOTCOM.WS4.
  30.  
  31.  .. Onscreen comment line
  32.  .AV variable
  33.  .AV "Enter variable", variable
  34.  .AW on
  35.  .AW off
  36.  .BP on
  37.  .BP off
  38.  .CP 9
  39.  .CS "Hello, world!"
  40.  .CW 12
  41.  .DF filename.typ
  42.  .DM "Message during printing"
  43.  .EI
  44.  .EL
  45.  .FI filename.typ
  46.  .FM 9
  47.  .FO footer0
  48.  .F1 footer1
  49.  .F2 footer2
  50.  .F3 footer3
  51.  .GO top
  52.  .GO bottom
  53.  .GO T
  54.  .GO B
  55.  .HE header0
  56.  .H1 header1
  57.  .H2 header2
  58.  .H3 header3
  59.  .HM 9
  60.  .IF condition
  61.  .IG "Noble prize"
  62.  .IX entry-text
  63.  .LH 9
  64.  .LM 9
  65.  .LQ on
  66.  .LQ off
  67.  .LS 1
  68.  .MA name=a+b*c
  69.  .MB 9
  70.  .MT 9
  71.  .OJ on
  72.  .OJ off
  73.  .OP
  74.  .PA
  75.  .PC 9
  76.  .PF on
  77.  .PF off
  78.  .PF dis
  79.  .PG
  80.  .PL 66
  81.  .PM 9
  82.  .PN 9
  83.  .PO 9
  84.  .PS on
  85.  .PS off
  86.  .RM 66
  87.  .RP 1
  88.  .RR     L-------!-------!-------!-------!-------!-------!-------!R
  89.  .RV var1,var2
  90.  .SR 9
  91.  .SV var1,data1
  92.  .TC table-of-contents
  93.  .UJ on
  94.  .UJ off
  95.  .UJ dis
  96.  .UL on
  97.  .UL off
  98.  .XE 12
  99.  .XL 13
  100.  .XQ 14
  101.  .XR 15
  102.  .XW 16
  103.  
  104. In case you would like to know how it is done, here  the listing
  105. of the BASIC program:
  106.  
  107. 10 REM WS4DOT.BAS  by Emmanuel ROCHE
  108. 20 :
  109. 30 PRINT
  110. 40 INPUT "WS4-to-DOT: Enter WS4 File Name: " ; file$
  111. 50 ' file$ = "dotcom"
  112. 60 PRINT
  113. 70 file1$ = file$ + ".WS4"
  114. 80 file2$ = file$ + ".DOT"
  115. 90 nofile$ = FIND$ (file1$)
  116. 100 IF nofile$ = "" THEN PRINT CHR$ (7) "File not found." : PRINT : END
  117. 110 OPEN "R", #1, file1$, 1
  118. 120 FIELD #1, 1 AS byte$
  119. 130 OPEN "O", #2, file2$
  120. 140 :
  121. 150 PRINT "List of WS4 dot commands inside file " UPPER$ (file1$) "."
  122. 160 PRINT #2, "List of WS4 dot commands inside file " UPPER$ (file1$) "."
  123. 170 PRINT
  124. 180 PRINT #2
  125. 190 :
  126. 200 GET #1
  127. 210 IF ASC (byte$) = &H1A THEN PRINT : END
  128. 220 GOSUB 250
  129. 230 GOTO 200  ' Main Loop
  130. 240 :
  131. 250 IF byte$ = "." THEN GOTO 310
  132. 260 WHILE ASC (byte$) <> &HA
  133. 270       GET #1
  134. 280       IF ASC (byte$) = &H8A THEN GOTO 200
  135. 290 WEND
  136. 300 :
  137. 310 IF byte$ = "." THEN PRINT " ." ;
  138. 320 IF byte$ = "." THEN PRINT #2, " ." ;
  139. 330 WHILE ASC (byte$) <> &HA
  140. 340       GET #1
  141. 350       IF ASC (byte$) = &H8D THEN PRINT : GOTO 390
  142. 360       PRINT byte$ ;
  143. 370       PRINT #2, byte$ ;
  144. 380 WEND
  145. 390 RETURN
  146.  
  147.  
  148. That's All, Folks!
  149.  
  150.  
  151. Yours Sincerely,
  152. "French Luser"
  153.  
  154.  
  155. EOF
  156.