d ** WRITER.BAS * CREATED FOR CODEWORKS MAGAZINE **f 3838 S.WARNER ST. TACOMA, WA 98409 (206)475-2219Gi Adapted for the Tandy 600 by Dave Thomas; GEnie's Laptops RoundTablell: AZ: I P:SP$SP$" ":m I P:DA$DA$"-":: I P:SX$SX$"x":n A$(2),S$(),W$(,),P(),R$()x   Z$$(): (Z$) (Z$)  :  ::P ,: (DA$,, )" The CodeWorks "(DA$,,!);~ ,:"W R I T I N G A N A L Y Z E R" ,:"examines the mechanics of your writing" DA$; " 1) Enter new text to analyze." " 2) Load and analyze existing text from disk."% > "Your choice: ? ";H  _  (Z$) ,bi   ""Do NOT use hyphenated words at the end of the line." ,"Do NOT use periods for abbreviations in any line." 6"Do NOT indent paragraphs."3 @"Do NOT allow the line to exceed screen width."n J"Hyphenated words in a line are counted as one word." T"Enter more than 100 but less than 300 words (about one screen full)." ^ h"Use ZZZ or zzz on a new line to terminate." r I 2 | A$(I)5  A$(I)"ZZZ" A$(I)"zzz" =  IG NI  ** CLOSE UP EXTRA SPACES BEFORE SAVING ON DISK **  I N X  L (A$(I))  AX (A$(I))  (A$(I),A,)" "   A  & A$(I)(A$(I),A)(A$(I),(A$(I))(A))0 XA8  L@  Ig "WHAT WILL YOU NAME THIS FILE";F$~  F$ OUTPUT AS 1  #,N & I N 0 #,A$(I) : I D  N "ENTER 1 TO ANALYZE THIS TEXT, 2 TO RETURN TO MENU";: X (Z$) l,x6b :"NAME OF FILE TO LOAD";: F$BlB$" X"JvJ\ F$ AS 1j#,N: Nx I N #,A$(I) A$(I)A$(I)A$(I)B$X AX (A$(I)): (A$(I),A,)" "  A  S$(J)(A$(I),X,AX):P(J)J{ (S$(J),)"." (S$(J),)(.)()) (S$(J),)(.)(") (S$(J),)"?" BB (S$(J),)(?)(") (S$(J),)"!" (S$(J),)(!)(") BB (S$(J),)(") QTQT (S$(J),)";" DD0 (S$(J),)"," EE: XAJJJ: R  IZ* 4 Jc :"TEXT UNDER 100 WORDS TOO SMALL TO EVALUATE PROPERLY.":>:"There are ";J;" words and ";B;" sentences,""H"it will take approximately two minutes to examine this text."]R ** CHANGE UC TO LC AND REMOVE ENDING PUNCTUATION ***k\ Q Jf (S$(Q)) p Q1 z (S$(Q),)"." (S$(Q),)(") (S$(Q),)"," (S$(Q),)";" (S$(Q),)"?" S$(Q)(S$(Q),(S$(Q)))g{ (S$(Q),)"!" (S$(Q),)":" (S$(Q),)")" S$(Q)(S$(Q),(S$(Q)))p Q1 (S$(Q),)"(" S$(Q)(S$(Q),(S$(Q))):PNPN (S$(Q),)(") S$(Q)(S$(Q),(S$(Q))) I (S$(Q))C$(S$(Q),I,)D C$"A" C$"Z" (S$(Q),I,)((C$) )[ C$"-" DHDHc Ik Q"Sorting words into alphabetical order." ** SORT THE WORDS ***NJMNM(M):"+"; M J$KNM.IJ8LIM.B S$(P(I))S$(P(L)) tJLTP(I):P(I)P(L):P(L)TTVIIMd` I tnj 8xtJJ~ JK  . ** FIND % OF SMALL MEDIUM AND LARGE WORDS ** I J (S$(P(I))) (S$(P(I))) MDMD& (S$(P(I))) SFSFE (S$(P(I))) MWMWd (S$(P(I))) LWLWl ISFSF(@LW)(@EMW) I J S$(P(I))S$(P(I)) VCVC IVCVC  ** FIND FREQ OF WORDS ***X$"#.###" U(I2FC'<LIFF S$(P(I))S$(P(L)) xNPQIZ QJ W$(U,)S$(P(I)):W$(U,)(FC):W$(U,)(2):UU: d S$(P(I))S$(P(Q)) FCFC:QQ: Zn FC W$(U,)S$(P(I)):W$(U,)(FC):W$(U,)(2):UU:IQxII: 2E ** ORGANIZE MOST USED WORDS ***NU1U] I k R$(I),Rz Q U1 W$(Q,)R$(I) W$(Q,)(I):  QW$(U,)R$(I):W$(U,)():W$(U,)(I):UU IF I ULI5 (W$(I,))(W$(L,)) ,_T$W$(I,):W$(I,)W$(L,):W$(L,)T$T$W$(I,):W$(I,)W$(L,):W$(L,)T$T$W$(I,):W$(I,)W$(L,):W$(L,)T$"F, I6 F &@AVJB:SW((J(SFMD))d)J:MW(MDd)J:LW(SFd)J:SC(Dd)J:SC(Dd)JbJPN(PNd)J:HN(DHd)J:QT(QTd)J:UW((VCJ)d)TCM(Ed)J:ML(((MDSF)J)d)^FI(((JB)((SFd)J))@@):FI(FI@P)h r "R E S U L T S for ";F$ "TOTAL WORDS ------------------ ";J6"TOTAL SENTENCES -------------- ";B`"AVG WORDS/SENTENCE ----------- ";AV"% SHORT WORDS ---------------- ";SW"% MEDIUM WORDS --------------- ";MW"% LONG WORDS ---------------- ";LW"% SEMI-COLON ----------------- ";SC2"% COMMAS --------------------- ";CM\"% PAREN PAIRS ---------------- ";PN"% HYPHENS -------------------- ";HN"% QUOTE PAIRS ---------------- ";QT"% UNIQUE WORDS ----------------";UW"% MEDIUM & LONG WORDS USED ----";ML."FOG INDEX -------------------->";FI] "Press ENTER for further analysis.";ZZ$g& m0:F1$" 0.1% 1% 2% 3% 4% 5% 6%" DF2$" ! ! ! ! ! ! ! ! ! ! ! !"bN" Smoothed average of 50 well-known writers use of most common words."X );"Common word usage as a % of total words in their texts."b F1$l F2$v );(DA$,,8) I  R$,RR(R )  R R / R$;);(SX$,,R);H);R$A I  I IOU "Press ENTER to see how you used the same words.";ZZ$   the,550,of,380,and,289,to,218,a,174,in,127,that,95,was,78,it,55,had,48,for,36,be,26,is,15,as,6,or,1,0,-1H ,: "Your common word usage as a % of total words."R F1$\ F2$t  );(DA$,,8) I  LI* R$,R 4R1(W$(L,)):R2R1:R1(R1d)J:R1(R1d): R1c R1b:R3((R2J)d):PT$W$(L,)"("(R3)"%)" : PT$(R2)) >R1(R1 ); H R1 R1_ R R$;);(SX$,,R1);H);PT$q W I  y \ I p "Press ENTER for next graph";ZZ$ z   );"Other words you used more than 3 times."  F1$  F2$ ! );(DA$,,8)!LS%! L U1!LSLS!R1(W$(L,)):R2R1:R1(R1d)J:R1(R1d): R1c R1b:R3((R2J)d):PT$W$(L,)"("(R3)"%)" : PT$(R2)!R1(R1 )! R1 R1! W$(L,););(SX$,,R1);H);PT$=" LS! $ : LS::"Press ENTER for more..";: ZZ$G" Q" F1$[" F2$s" );(DA$,,8){"$ L". U "Apparently you used no others.""8 "B "Repeat the result sequences (y/n)";:ZZ$$()#L ZZ$"Y" ZZ$"y" h #V >#` " Psssst... can we talk? (y/n)";:ZZ$$()\#j ZZ$"Y" ZZ$"y"  f#t #~ "If we can't communicate, then it's all over."# # "There is no way for a computer to evaluate the subject matter of".$ "your writing. Those writing techniques which may be quantified"s$ "however, will indicate your success in reaching your intended"$ "audience. Please answer the following question or questions."$ % "What educational grade level (1 thru 24) are you aiming at";: GL % FIGL : < U% "You missed the intended grade level by ";FIGL[% % "Based upon your sample text, here are some suggestions which may"% "bring your readability index down to the level you desire."% % AV n & ML2  '& SC  ;&( UW2 , E&2 P &< "Your writing should easily be understood by people with an"&F "education through grade";FI&P &Z "End of program."&d &n * long sentence response *.'x "Your sentences have an average length of ";(AV);"words."o' "You may look for complex sentences and break them up into"' "smaller ones. Change dependent clauses to independent clauses."' "If long sentences are necessary, counter-balance them with"( "several shorter ones."( :I( * too many medium long word response *( "Shorten the average length of your words. Of all the words"( "you used,";ML;" percent were medium and long. You may want") "to rewrite your sentence after changing words to maintain"O) "the rhythm. It helps to exchange long, complex words with"o) "two or three short ones."w) :) * semi-colon response *) "You used";(SCd);"semi-colons. These may be necessary,"* "but if used to separate two or more complete thoughts, it will"Q* "help readability to restructure the sentence."Y*" :~*, * unique word count response **6 "You have used more than half the words in your text two or"+@ "more times. Both reader interest and readability increase"2+J "when a greater variety of words are used."8+T g+ :"Press ENTER to continue -> ";:A$$()w+ IZ + IZ,,: SP$;: IZ+ ,,:"";+