From: "Salle Arobase" Newsgroups: comp.os.cpm Subject: WS4 Dot Commands Date: Wed, 20 Aug 2003 13:57:54 +0200 Organization: Ville de Rochefort Lines: 141 Message-ID: Reply-To: "Salle Arobase" NNTP-Posting-Host: apoitiers-106-2-1-186.w193-253.abo.wanadoo.fr X-Trace: news-reader5.wanadoo.fr 1061380171 5497 193.253.213.186 (20 Aug 2003 11:49:31 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 20 Aug 2003 11:49:31 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 WS4DOT.TXT by Emmanuel ROCHE ---------- How do you get/display/filter/remove all the "dot commands" in a WS4 file? First, you make a WS4 file containing all the (documented...) dot commands (see "Appendix G" of your favorite big binder). An hypothetical program could then produce the following: List of WS4 dot commands inside file DOTCOM.WS4. .. Onscreen comment line .AV variable .AV "Enter variable", variable .AW on .AW off .BP on .BP off .CP 9 .CS "Hello, world!" .CW 12 .DF filename.typ .DM "Message during printing" .EI .EL .FI filename.typ .FM 9 .FO footer0 .F1 footer1 .F2 footer2 .F3 footer3 .GO top .GO bottom .GO T .GO B .HE header0 .H1 header1 .H2 header2 .H3 header3 .HM 9 .IF condition .IG "Noble prize" .IX entry-text .LH 9 .LM 9 .LQ on .LQ off .LS 1 .MA name=a+b*c .MB 9 .MT 9 .OJ on .OJ off .OP .PA .PC 9 .PF on .PF off .PF dis .PG .PL 66 .PM 9 .PN 9 .PO 9 .PS on .PS off .RM 66 .RP 1 .RR L-------!-------!-------!-------!-------!-------!-------!R .RV var1,var2 .SR 9 .SV var1,data1 .TC table-of-contents .UJ on .UJ off .UJ dis .UL on .UL off .XE 12 .XL 13 .XQ 14 .XR 15 .XW 16 In case you would like to know how it is done, here the listing of the BASIC program: 10 REM WS4DOT.BAS by Emmanuel ROCHE 20 : 30 PRINT 40 INPUT "WS4-to-DOT: Enter WS4 File Name: " ; file$ 50 ' file$ = "dotcom" 60 PRINT 70 file1$ = file$ + ".WS4" 80 file2$ = file$ + ".DOT" 90 nofile$ = FIND$ (file1$) 100 IF nofile$ = "" THEN PRINT CHR$ (7) "File not found." : PRINT : END 110 OPEN "R", #1, file1$, 1 120 FIELD #1, 1 AS byte$ 130 OPEN "O", #2, file2$ 140 : 150 PRINT "List of WS4 dot commands inside file " UPPER$ (file1$) "." 160 PRINT #2, "List of WS4 dot commands inside file " UPPER$ (file1$) "." 170 PRINT 180 PRINT #2 190 : 200 GET #1 210 IF ASC (byte$) = &H1A THEN PRINT : END 220 GOSUB 250 230 GOTO 200 ' Main Loop 240 : 250 IF byte$ = "." THEN GOTO 310 260 WHILE ASC (byte$) <> &HA 270 GET #1 280 IF ASC (byte$) = &H8A THEN GOTO 200 290 WEND 300 : 310 IF byte$ = "." THEN PRINT " ." ; 320 IF byte$ = "." THEN PRINT #2, " ." ; 330 WHILE ASC (byte$) <> &HA 340 GET #1 350 IF ASC (byte$) = &H8D THEN PRINT : GOTO 390 360 PRINT byte$ ; 370 PRINT #2, byte$ ; 380 WEND 390 RETURN That's All, Folks! Yours Sincerely, "French Luser" EOF