Home » CEEFAX disks » telesoftware17.adl » 25-08-89/ELIZA

25-08-89/ELIZA

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware17.adl
Filename: 25-08-89/ELIZA
Read OK:
File size: 2305 bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM ELIZA
   20REM By Rod Nicolson
   30REM For BBC B/B+/M/C/E
   40REM (c) Acorn User  March 1987
   50:
   60MODE7
   70PROC_setup_prog
   80PROC_intro
   90REPEAT
  100PROC_clear
  110in$=FN_input_line
  120IF RIGHT$(in$,1)="?" THEN Question%=1 ELSE Question%=0
  130in1$=FN_tidy(in$)
  140in2$=FN_exchange(in1$)
  150match$=FN_match(in2$)
  160IF Skip_rest%=0 THEN out$=FN_transform(match$,in2$) ELSE out$=match$
  170Last$=out$
  180IF FN_list(out$) THEN out$=FN_head(out$)
  190PROC_print(0,-1,out$)
  200UNTIL End%
  210END
  220:
  230DEF PROC_setup_prog
  240DIM L$(15)
  250Family$=",family,parent,parents,wife,husband,son,sons,mother,father,sister,sisters,brother,brothers,daughter,daughters,"
  260Rude$=",idiot,stupid,wally,twit,dumb,plonker,"
  270Question$=",why,what,when,who,how,"
  280Neg$=",not,no,wont,cant,dont,never,nobody,noone,"
  290Friends$=",boyfriend,girlfriend,friend,friends,lover,mate,mates,"
  300Good_feelings$=",like,likes,happy,love,loves,"
  310Bad_feelings$=",dislike,dislikes,unhappy,hate,hates,depressed,suicidal,"
  320Important$=",need,job,work,unemployed,home,customers,"
  330Greetings$=",hello,hi,goodbye,bye,cheerio,finish,"
  340Exchange$="/,i am,you. are,/,i was,you. were,/,you are,I am,/,you were,I was,/,are you,am I,/,am i,are you.,/,were you,was I,/,was i,were you.,/,i,you.,/,me,you.,/,you,me,/,my,your.,/,us,you,/,your,my,/"
  350Yes_no$=",yes,no,may,might,perhaps,"
  360Mentioned$=" parents " : Last$="//"
  370End%=0 : Greet%=0
  380Trace%=0 : REM change this to Trace%=1 to turn on trace messages
  390ENDPROC
  400:
  410DEF PROC_intro
  420CLS
  430PRINT "ELIZA"''"Please tell me about your problems"
  440PROC_print(0,4,"I can't guarantee success, but often it helps just to talk problems over.")
  450PRINT
  460ENDPROC
  470:
  480DEF PROC_clear
  490Exchanges%=0 : Rude%=0 : Skip_rest%=0 : Neg%=0
  500ENDPROC
  510:
  520DEF FN_input_line
  530LOCAL in$,a$
  540REPEAT
  550PRINT ">>";
  560in$=GET$
  570PRINT in$;
  580UNTIL in$<>CHR$13
  590REPEAT
  600a$=INKEY$(3000) : PRINTa$;
  610IF a$<>CHR$13 in$=in$+a$
  620IF a$=CHR$127 in$=LEFT$(in$,LEN(in$)-2)
  630UNTIL a$=CHR$13 OR a$="" OR a$="." OR a$="!" OR a$="?"
  640PRINT
  650= in$
  660:
  670DEF FN_tidy(in$)
  680LOCAL a$,a%,n%,out$
  690out$=" "
  700FOR n%=1 TO LEN(in$)
  710a$=MID$(in$,n%,1):a%=ASC(a$)
  720IF a%>64 AND a%<91 THEN out$=out$+CHR$(a%+32)
  730IF (a%>96 AND a%<127) OR (a%>47 AND a%<58) THEN out$=out$+a$
  740IF a%=32 AND RIGHT$(out$,1)<>" " THEN out$=out$+" "
  750NEXT
  760= out$+" "
  770:
  780DEF FN_exchange(in$)
  790LOCAL n%,m%,m1%,m2%,j%,out$,sep$,l1$,l2$
  800sep$=LEFT$(in$,1) : out$=in$
  810m%=FN_unlist(Exchange$)
  820FORn%=1 TO m%
  830IF n%>1 THEN m%=FN_unlist(Exchange$)
  840m1%=FN_unlist(L$(n%))
  850l1$=L$(1) : l2$=L$(2)
  860IF LEN(l1$)+2<LEN(out$) THEN j%=INSTR(out$,sep$+l1$+sep$) ELSE j%=0
  870IF j%>0 THEN out$=LEFT$(out$,j%)+l2$+RIGHT$(out$,LEN(out$)-LEN(l1$)-j%) : Exchnges%=Exchanges%+1
  880NEXT
  890m%=FN_unlist("."+out$+"."):out$=FN_enlist(m%,"")
  900= out$
  910:
  920DEF FN_match(in$)
  930LOCAL words%,greet$,key_words$,s$
  940words%=FN_unlist(in$)
  950IF words%=0 THEN Skip_rest%=1 : = "I'm not telepathic  - please type in some WORDS!"
  960greet$=FN_intersection(Greetings$,in$)
  970IF LEN(greet$)>2 THEN = FN_greet(FN_head(greet$))
  980IF LEN(FN_intersection(Rude$,in$))>2 THEN Skip_rest%=1 : = FN_rude
  990s$=FN_intersection(Neg$,in$) : Neg%=FN_unlist(s$)
 1000s$=FN_intersection(Yes_no$,in$)
 1010IF LEN(s$)>2 THEN = FN_yes_no(FN_head(s$))
 1020key_words$=FN_key_words(in$)
 1030Mentioned$=FN_add_list(key_words$,Mentioned$)
 1040IF FN_unlist(Mentioned$)>13 THEN Mentioned$=FN_tail(Mentioned$)
 1050question$=FN_intersection(Question$,in$)
 1060IF LEN(question$)>2 OR Question%=1 THEN Skip_rest%=1 : = FN_question(in$)
 1070= key_words$
 1080:
 1090DEF FN_key_words(in$)
 1100LOCAL key$,sep$,i$
 1110key$="//"
 1120key$=FN_add_list(FN_intersection(Family$,in$), key$)
 1130key$=FN_add_list(FN_intersection(Good_feelings$,in$), key$)
 1140key$=FN_add_list(FN_intersection(Bad_feelings$,in$), key$)
 1150key$=FN_add_list(FN_intersection(Important$,in$), key$)
 1160key$=FN_add_list(FN_intersection(Friends$,in$), key$)
 1170= key$
 1180:
 1190DEF FN_transform(match$,in$)
 1200LOCAL m%,n%
 1210m%=FN_unlist(match$)
 1220IF (m%=0 AND Exchanges%=0) THEN = FN_bluff
 1230IF m%=0 THEN = FN_restate(in$)
 1240IF m%>1 THEN r%=RND(m%) ELSE r%=1
 1250w$=L$(r%)
 1260IF FN_member(w$,Family$)>0 THEN = FN_family(w$)
 1270IF FN_member(w$,Good_feelings$)>0 THEN = FN_good(w$)
 1280IF FN_member(w$,Bad_feelings$)>0 THEN = FN_bad(w$)
 1290IF FN_member(w$,Important$)>0 THEN = FN_important(w$)
 1300IF FN_member(w$,Friends$)>0 THEN = FN_friends(w$)
 1310= in$
 1320:
 1330DEF FN_greet(w$)
 1340Skip_rest%=1
 1350IF w$="hello" OR w$="hi" THEN w$="hello" : IF Greet%=0 THEN Greet%=1 : = w$ ELSE IF w$="hello" THEN = "hello again"
 1360End%=1 : = "Goodbye, I hope that you will try another session soon"
 1370:
 1380DEF FN_rude
 1390IF Trace% THEN PRINT"RUDE"
 1400r%=RND(10)
 1410Skip_rest%=1
 1420IF r%<6 THEN = "Please remain calm" ELSE IF r%<9 THEN = "There's no need for that sort of language" ELSE = "Don't swear at me sunshine"
 1430:
 1440DEF FN_bluff
 1450LOCAL n%,previous$
 1460IF Trace% THEN PRINT"BLUFF"
 1470IF FN_unlist(Last$)>0 THEN = L$(2)
 1480n%=RND(15)
 1490IF n%<=3 THEN = "Please go on"
 1500IF n%<=4 THEN End%=1 : = "I'm sorry, I have to go now. I hope you have found our chat helpful"
 1510IF n%<=8 THEN = "/Do you have any worries about your work?/Tell me about your worries./"
 1520IF n%<=10 THEN = "Who are the most important people in your life?"
 1530m%=FN_unlist(Mentioned$)
 1540IF m%>1 THEN n%=RND(m%) ELSE n%=1
 1550previous$=L$(n%)
 1560IF FN_member(previous$,Bad_feelings$) THEN = "Let's go back to your negative emotions:"+CHR$13+CHR$10+"Tell me about your feeling of "+previous$
 1570= "Please tell me more about your "+previous$
 1580:
 1590DEF FN_restate(in$)
 1600LOCAL m%,n%,s%
 1610IF Trace% THEN PRINT "RESTATE"
 1620IF FN_unlist(Last$)>0 THEN = L$(2)
 1630in$=MID$(in$,2,LEN(in$)-2)
 1640IF RND(2)=1 THEN = in$+"?" ELSE = "why do you say "+in$+"?"
 1650:
 1660DEF FN_family(w$)
 1670IF Trace% THEN PRINT "FAMILY"
 1680r%=RND(5)
 1690IF r%=1 THEN = "Tell me more about your "+w$
 1700IF r%=2 THEN = "Tell me more about your parents"
 1710IF r%=3 THEN = "/Do you have a large family?/Who is the closest to you?/"
 1720IF r%=4 THEN = "Is your family very important to you?/Who do you like the best?"
 1730IF r%=5 THEN = "It's hard to keep on good terms with everyone"
 1740:
 1750DEF FN_good(w$)
 1760IF Trace% THEN PRINT "GOOD FEELINGS"
 1770IF Neg%=1 THEN Neg%=-1 : = FN_bad(w$)
 1780= "I am glad to hear it"
 1790:
 1800DEF FN_important(w$)
 1810IF Trace% THEN PRINT "IMPORTANT"
 1820r%=RND(10)
 1830IF r%=1 THEN = "You're right to be concerned"
 1840IF r%=2 THEN = "Times are very difficult"
 1850IF r%=3 THEN = "I think the government is to blame"
 1860IF r%<9 AND w$<>"unemployed" AND w$<>"need" THEN = "Tell me about your "+w$
 1870= "How are your family reacting to the situation?"
 1880:
 1890DEF FN_friends(w$)
 1900IF Trace% THEN PRINT"FRIENDS"
 1910r%=RND(10)
 1920IF r%<=4 THEN = "What sorts of problems are caused by your "+w$+"?"
 1930IF r%<10 THEN = "How well do your parents get on with your "+w$+"?"
 1940IF r%=10 THEN = "You can never tell how things will turn out"
 1950:
 1960DEF FN_bad(w$)
 1970IF Trace% THEN PRINT "BAD FEELINGS"
 1980IF Neg%=1 THEN Neg%=-1 : = FN_good(w$)
 1990r%=RND(10)
 2000IF r%=1 THEN = "Try to think positive!"
 2010IF r%<6 THEN = "/Do your family give you any support?/Who is the most supportive?/"
 2020= "/Is there anyone who can help you?/Tell me about your friends./"
 2030:
 2040DEF FN_question(w$)
 2050IF Trace% THEN PRINT "QUESTION"
 2060r%=RND(10)
 2070IF r%<3 THEN = "What do you think?"
 2080IF r%<6 OR (r%<8 AND Exchanges%>1) THEN = "What do you mean - '"+w$+"'?"
 2090= "Why do you want to know?"
 2100:
 2110DEF FN_yes_no(w$)
 2120IF Trace% THEN PRINT "YES_NO"
 2130Skip_rest%=1
 2140IF w$<>"yes" AND w$<>"no" THEN = "/Why aren't you sure?/Why is this important to you?/"
 2150IF FN_unlist(Last$)>1 THEN = L$(2)
 2160= "What do you mean - "+w$+"?"
 2170:
 2180DEF PROC_print(xtab,ytab,out$)
 2190IF LEFT$(out$,1)<>" " THEN out$=" "+out$
 2200IF RIGHT$(out$,1)<>" " THEN out$=out$+" "
 2210m%=FN_unlist(out$)
 2220out$="" : len%=xtab-1
 2230FOR n%=1 TO m%
 2240len%=len%+LEN(L$(n%))+1
 2250IF len%>40 THEN len%=LEN(L$(n%)) : L$(n%)=CHR$8+CHR$13+CHR$10+L$(n%)
 2260IF len%=40 THEN len%=0 : L$(n%+1)=CHR$8+L$(n%+1)
 2270NEXT
 2280out$=FN_enlist(m%," ")
 2290out$=MID$(out$,2,LEN(out$)-2)
 2300IF ytab>-1 THEN PRINT TAB(xtab,ytab);out$ ELSE PRINT TAB(xtab);out$
 2310ENDPROC
31000REM List-Processing Package
31010REM By Rod Nicolson
31020REM For BBC B/B+/M/C/E
31030REM (c) Acorn User  March 1987
31040:
31050DEF FN_list(list$)
31060IF LEFT$(list$,1) = RIGHT$(list$,1) THEN = 1 ELSE = 0
31070:
31080DEF FN_unlist(list$)
31090LOCAL n%,sep$
31100IF LENlist$ <= 2 THEN = 0
31110IF FN_list(list$)=0 THEN = -1
31120n%=0 : sep$=LEFT$(list$,1)
31130REPEAT
31140n%=n%+1
31150L$(n%)=FN_head(list$)
31160list$=RIGHT$(list$,LEN(list$)-LEN(L$(n%))-1)
31170UNTIL LENlist$<=2
31180= n%
31190:
31200DEF FN_enlist(max%,sep$)
31210LOCAL n%,list$
31220list$=sep$
31230FORn%=1 TO max%
31240list$=list$+L$(n%)+sep$
31250NEXT
31260= list$
31270:
31280DEF FN_head(list$)
31290LOCAL n%
31300n%=INSTR(RIGHT$(list$,LENlist$-1),LEFT$(list$,1))
31310=MID$(list$,2,n%-1)
31320:
31330DEF FN_tail(list$)
31340LOCAL n%,sep$
31350sep$=LEFT$(list$,1)
31360n%=INSTR(RIGHT$(list$,LENlist$-1),sep$)
31370IF n%<LEN(list$)-1 THEN = sep$+MID$(list$,n%+2,LENlist$) ELSE = sep$+sep$
31380:
31390DEF FN_member(item$,list$)
31400LOCAL n%,sep$,s$
31410sep$=LEFT$(list$,1)
31420s$=sep$+item$+sep$
31430IF LENs$>LENlist$ THEN = 0
31440n%=INSTR(list$,s$) : IF n%=0 THEN = 0
31450= 1+FN_unlist(LEFT$(list$,n%))
31460:
31470DEF FN_add_element(element$,list$)
31480IF LENlist$=2 THEN list$=LEFT$(list$,1) ELSE IF list$="" THEN list$=sep$
31490= LEFT$(list$,1)+item$+list$
31500:
31510DEF FN_add_list(list1$,list2$)
31520LOCAL sep2$,l1$,m1%
31530sep2$=LEFT$(list2$,1)
31540m1%=FN_unlist(list1$)
31550IF m1%=0 THEN = list2$
31560l1$=FN_enlist(m1%,sep2$)
31570IF LEN(list2$)<=2 THEN = l1$ ELSE = LEFT$(l1$,LEN(l1$)-1)+list2$
31580:
31590DEF FN_intersection(list1$, list2$)
31600LOCAL out$,n%,m%,j%,sep$,l$
31610out$="" : sep$=LEFT$(list2$,1)
31620m%=FN_unlist(list1$)
31630FOR n%=1 TO m%
31640IF n%>1 THEN m%=FN_unlist(list1$)
31650l$=L$(n%) : j%=FN_member(l$,list2$)
31660IF j%>0 THEN out$=out$+sep$+l$
31670NEXT
31680IFout$="" THEN = sep$+sep$
31690= out$+sep$

� ELIZA
� By Rod Nicolson
� For BBC B/B+/M/C/E
( � (c) Acorn User  March 1987
2:
<�7
F�_setup_prog
P�_intro
Z�
d�_clear
nin$=�_input_line
x-� �in$,1)="?" � Question%=1 � Question%=0
�in1$=�_tidy(in$)
�in2$=�_exchange(in1$)
�match$=�_match(in2$)
�@� Skip_rest%=0 � out$=�_transform(match$,in2$) � out$=match$
�Last$=out$
�&� �_list(out$) � out$=�_head(out$)
��_print(0,-1,out$)
�
� End%
��
�:
�� �_setup_prog
�� L$(15)
�|Family$=",family,parent,parents,wife,husband,son,sons,mother,father,sister,sisters,brother,brothers,daughter,daughters,"
2Rude$=",idiot,stupid,wally,twit,dumb,plonker,"
'Question$=",why,what,when,who,how,"
5Neg$=",not,no,wont,cant,dont,never,nobody,noone,"
"EFriends$=",boyfriend,girlfriend,friend,friends,lover,mate,mates,"
,2Good_feelings$=",like,likes,happy,love,loves,"
6LBad_feelings$=",dislike,dislikes,unhappy,hate,hates,depressed,suicidal,"
@:Important$=",need,job,work,unemployed,home,customers,"
J6Greetings$=",hello,hi,goodbye,bye,cheerio,finish,"
T�Exchange$="/,i am,you. are,/,i was,you. were,/,you are,I am,/,you were,I was,/,are you,am I,/,am i,are you.,/,were you,was I,/,was i,were you.,/,i,you.,/,me,you.,/,you,me,/,my,your.,/,us,you,/,your,my,/"
^(Yes_no$=",yes,no,may,might,perhaps,"
h'Mentioned$=" parents " : Last$="//"
rEnd%=0 : Greet%=0
|BTrace%=0 : � change this to Trace%=1 to turn on trace messages
��
�:
�
� �_intro
��
�3� "ELIZA"''"Please tell me about your problems"
�\�_print(0,4,"I can't guarantee success, but often it helps just to talk problems over.")
��
��
�:
�
� �_clear
�2Exchanges%=0 : Rude%=0 : Skip_rest%=0 : Neg%=0
��
�:
� �_input_line
� in$,a$
�
&� ">>";
0	in$=�
:
� in$;
D� in$<>�13
N�
Xa$=�(3000) : �a$;
b� a$<>�13 in$=in$+a$
l � a$=�127 in$=�in$,�(in$)-2)
v/� a$=�13 � a$="" � a$="." � a$="!" � a$="?"
��
�	= in$
�:
�� �_tidy(in$)
�� a$,a%,n%,out$
�out$=" "
�� n%=1 � �(in$)
�a$=�in$,n%,1):a%=�(a$)
�(� a%>64 � a%<91 � out$=out$+�(a%+32)
�7� (a%>96 � a%<127) � (a%>47 � a%<58) � out$=out$+a$
�+� a%=32 � �out$,1)<>" " � out$=out$+" "
��
�= out$+" "
:
� �_exchange(in$)
(� n%,m%,m1%,m2%,j%,out$,sep$,l1$,l2$
 sep$=�in$,1) : out$=in$
*m%=�_unlist(Exchange$)
4�n%=1 � m%
>#� n%>1 � m%=�_unlist(Exchange$)
Hm1%=�_unlist(L$(n%))
Rl1$=L$(1) : l2$=L$(2)
\7� �(l1$)+2<�(out$) � j%=�out$,sep$+l1$+sep$) � j%=0
fQ� j%>0 � out$=�out$,j%)+l2$+�out$,�(out$)-�(l1$)-j%) : Exchnges%=Exchanges%+1
p�
z2m%=�_unlist("."+out$+"."):out$=�_enlist(m%,"")
�
= out$
�:
�� �_match(in$)
�!� words%,greet$,key_words$,s$
�words%=�_unlist(in$)
�T� words%=0 � Skip_rest%=1 : = "I'm not telepathic  - please type in some WORDS!"
�)greet$=�_intersection(Greetings$,in$)
�-� �(greet$)>2 � = �_greet(�_head(greet$))
�>� �(�_intersection(Rude$,in$))>2 � Skip_rest%=1 : = �_rude
�3s$=�_intersection(Neg$,in$) : Neg%=�_unlist(s$)
�"s$=�_intersection(Yes_no$,in$)
�&� �(s$)>2 � = �_yes_no(�_head(s$))
�key_words$=�_key_words(in$)
0Mentioned$=�_add_list(key_words$,Mentioned$)
=� �_unlist(Mentioned$)>13 � Mentioned$=�_tail(Mentioned$)
+question$=�_intersection(Question$,in$)
$E� �(question$)>2 � Question%=1 � Skip_rest%=1 : = �_question(in$)
.= key_words$
8:
B� �_key_words(in$)
L� key$,sep$,i$
V
key$="//"
`6key$=�_add_list(�_intersection(Family$,in$), key$)
j=key$=�_add_list(�_intersection(Good_feelings$,in$), key$)
t<key$=�_add_list(�_intersection(Bad_feelings$,in$), key$)
~9key$=�_add_list(�_intersection(Important$,in$), key$)
�7key$=�_add_list(�_intersection(Friends$,in$), key$)
�
= key$
�:
�� �_transform(match$,in$)
�� m%,n%
�m%=�_unlist(match$)
�'� (m%=0 � Exchanges%=0) � = �_bluff
�� m%=0 � = �_restate(in$)
�� m%>1 � r%=�(m%) � r%=1
�
w$=L$(r%)
�-� �_member(w$,Family$)>0 � = �_family(w$)
�2� �_member(w$,Good_feelings$)>0 � = �_good(w$)
0� �_member(w$,Bad_feelings$)>0 � = �_bad(w$)

3� �_member(w$,Important$)>0 � = �_important(w$)
/� �_member(w$,Friends$)>0 � = �_friends(w$)
	= in$
(:
2� �_greet(w$)
<Skip_rest%=1
Fg� w$="hello" � w$="hi" � w$="hello" : � Greet%=0 � Greet%=1 : = w$ � � w$="hello" � = "hello again"
PGEnd%=1 : = "Goodbye, I hope that you will try another session soon"
Z:
d� �_rude
n� Trace% � �"RUDE"
xr%=�(10)
�Skip_rest%=1
�}� r%<6 � = "Please remain calm" � � r%<9 � = "There's no need for that sort of language" � = "Don't swear at me sunshine"
�:
�
� �_bluff
�� n%,previous$
�� Trace% � �"BLUFF"
�!� �_unlist(Last$)>0 � = L$(2)
�n%=�(15)
�� n%<=3 � = "Please go on"
�^� n%<=4 � End%=1 : = "I'm sorry, I have to go now. I hope you have found our chat helpful"
�X� n%<=8 � = "/Do you have any worries about your work?/Tell me about your worries./"
�B� n%<=10 � = "Who are the most important people in your life?"
�m%=�_unlist(Mentioned$)
� m%>1 � n%=�(m%) � n%=1
previous$=L$(n%)
�� �_member(previous$,Bad_feelings$) � = "Let's go back to your negative emotions:"+�13+�10+"Tell me about your feeling of "+previous$
"1= "Please tell me more about your "+previous$
,:
6� �_restate(in$)
@� m%,n%,s%
J� Trace% � � "RESTATE"
T!� �_unlist(Last$)>0 � = L$(2)
^in$=�in$,2,�(in$)-2)
h6� �(2)=1 � = in$+"?" � = "why do you say "+in$+"?"
r:
|� �_family(w$)
�� Trace% � � "FAMILY"
�r%=�(5)
�,� r%=1 � = "Tell me more about your "+w$
�0� r%=2 � = "Tell me more about your parents"
�I� r%=3 � = "/Do you have a large family?/Who is the closest to you?/"
�P� r%=4 � = "Is your family very important to you?/Who do you like the best?"
�>� r%=5 � = "It's hard to keep on good terms with everyone"
�:
�� �_good(w$)
� � Trace% � � "GOOD FEELINGS"
�$� Neg%=1 � Neg%=-1 : = �_bad(w$)
�= "I am glad to hear it"
�:
� �_important(w$)
� Trace% � � "IMPORTANT"
r%=�(10)
&-� r%=1 � = "You're right to be concerned"
0)� r%=2 � = "Times are very difficult"
:3� r%=3 � = "I think the government is to blame"
DG� r%<9 � w$<>"unemployed" � w$<>"need" � = "Tell me about your "+w$
N6= "How are your family reacting to the situation?"
X:
b� �_friends(w$)
l� Trace% � �"FRIENDS"
vr%=�(10)
�C� r%<=4 � = "What sorts of problems are caused by your "+w$+"?"
�C� r%<10 � = "How well do your parents get on with your "+w$+"?"
�=� r%=10 � = "You can never tell how things will turn out"
�:
�� �_bad(w$)
�� Trace% � � "BAD FEELINGS"
�%� Neg%=1 � Neg%=-1 : = �_good(w$)
�r%=�(10)
�'� r%=1 � = "Try to think positive!"
�S� r%<6 � = "/Do your family give you any support?/Who is the most supportive?/"
�G= "/Is there anyone who can help you?/Tell me about your friends./"
�:
�� �_question(w$)
� Trace% � � "QUESTION"
r%=�(10)
#� r%<3 � = "What do you think?"
 E� r%<6 � (r%<8 � Exchanges%>1) � = "What do you mean - '"+w$+"'?"
* = "Why do you want to know?"
4:
>� �_yes_no(w$)
H� Trace% � � "YES_NO"
RSkip_rest%=1
\U� w$<>"yes" � w$<>"no" � = "/Why aren't you sure?/Why is this important to you?/"
f!� �_unlist(Last$)>1 � = L$(2)
p"= "What do you mean - "+w$+"?"
z:
�� �_print(xtab,ytab,out$)
�#� �out$,1)<>" " � out$=" "+out$
�#� �out$,1)<>" " � out$=out$+" "
�m%=�_unlist(out$)
�out$="" : len%=xtab-1
�� n%=1 � m%
�len%=len%+�(L$(n%))+1
�9� len%>40 � len%=�(L$(n%)) : L$(n%)=�8+�13+�10+L$(n%)
�-� len%=40 � len%=0 : L$(n%+1)=�8+L$(n%+1)
��
�out$=�_enlist(m%," ")
�out$=�out$,2,�(out$)-2)
�2� ytab>-1 � � �xtab,ytab);out$ � � �xtab);out$
	�
y� List-Processing Package
y"� By Rod Nicolson
y,� For BBC B/B+/M/C/E
y6 � (c) Acorn User  March 1987
y@:
yJ� �_list(list$)
yT'� �list$,1) = �list$,1) � = 1 � = 0
y^:
yh� �_unlist(list$)
yr
� n%,sep$
y|� �list$ <= 2 � = 0
y�� �_list(list$)=0 � = -1
y�n%=0 : sep$=�list$,1)
y��
y�n%=n%+1
y�L$(n%)=�_head(list$)
y�&list$=�list$,�(list$)-�(L$(n%))-1)
y�� �list$<=2
y�= n%
y�:
y�� �_enlist(max%,sep$)
y�� n%,list$
y�list$=sep$
y��n%=1 � max%
zlist$=list$+L$(n%)+sep$
z�
z= list$
z&:
z0� �_head(list$)
z:� n%
zD#n%=��list$,�list$-1),�list$,1))
zN=�list$,2,n%-1)
zX:
zb� �_tail(list$)
zl
� n%,sep$
zvsep$=�list$,1)
z�n%=��list$,�list$-1),sep$)
z�>� n%<�(list$)-1 � = sep$+�list$,n%+2,�list$) � = sep$+sep$
z�:
z�� �_member(item$,list$)
z�� n%,sep$,s$
z�sep$=�list$,1)
z�s$=sep$+item$+sep$
z�� �s$>�list$ � = 0
z� n%=�list$,s$) : � n%=0 � = 0
z�= 1+�_unlist(�list$,n%))
z�:
z�#� �_add_element(element$,list$)
z�:� �list$=2 � list$=�list$,1) � � list$="" � list$=sep$
{= �list$,1)+item$+list$
{:
{� �_add_list(list1$,list2$)
{ � sep2$,l1$,m1%
{*sep2$=�list2$,1)
{4m1%=�_unlist(list1$)
{>� m1%=0 � = list2$
{Hl1$=�_enlist(m1%,sep2$)
{R4� �(list2$)<=2 � = l1$ � = �l1$,�(l1$)-1)+list2$
{\:
{f$� �_intersection(list1$, list2$)
{p� out$,n%,m%,j%,sep$,l$
{zout$="" : sep$=�list2$,1)
{�m%=�_unlist(list1$)
{�� n%=1 � m%
{� � n%>1 � m%=�_unlist(list1$)
{�&l$=L$(n%) : j%=�_member(l$,list2$)
{�� j%>0 � out$=out$+sep$+l$
{��
{��out$="" � = sep$+sep$
{�= out$+sep$
�
00000000  0d 00 0a 0b f4 20 45 4c  49 5a 41 0d 00 14 15 f4  |..... ELIZA.....|
00000010  20 42 79 20 52 6f 64 20  4e 69 63 6f 6c 73 6f 6e  | By Rod Nicolson|
00000020  0d 00 1e 18 f4 20 46 6f  72 20 42 42 43 20 42 2f  |..... For BBC B/|
00000030  42 2b 2f 4d 2f 43 2f 45  0d 00 28 20 f4 20 28 63  |B+/M/C/E..( . (c|
00000040  29 20 41 63 6f 72 6e 20  55 73 65 72 20 20 4d 61  |) Acorn User  Ma|
00000050  72 63 68 20 31 39 38 37  0d 00 32 05 3a 0d 00 3c  |rch 1987..2.:..<|
00000060  06 eb 37 0d 00 46 10 f2  5f 73 65 74 75 70 5f 70  |..7..F.._setup_p|
00000070  72 6f 67 0d 00 50 0b f2  5f 69 6e 74 72 6f 0d 00  |rog..P.._intro..|
00000080  5a 05 f5 0d 00 64 0b f2  5f 63 6c 65 61 72 0d 00  |Z....d.._clear..|
00000090  6e 14 69 6e 24 3d a4 5f  69 6e 70 75 74 5f 6c 69  |n.in$=._input_li|
000000a0  6e 65 0d 00 78 2d e7 20  c2 69 6e 24 2c 31 29 3d  |ne..x-. .in$,1)=|
000000b0  22 3f 22 20 8c 20 51 75  65 73 74 69 6f 6e 25 3d  |"?" . Question%=|
000000c0  31 20 8b 20 51 75 65 73  74 69 6f 6e 25 3d 30 0d  |1 . Question%=0.|
000000d0  00 82 14 69 6e 31 24 3d  a4 5f 74 69 64 79 28 69  |...in1$=._tidy(i|
000000e0  6e 24 29 0d 00 8c 19 69  6e 32 24 3d a4 5f 65 78  |n$)....in2$=._ex|
000000f0  63 68 61 6e 67 65 28 69  6e 31 24 29 0d 00 96 18  |change(in1$)....|
00000100  6d 61 74 63 68 24 3d a4  5f 6d 61 74 63 68 28 69  |match$=._match(i|
00000110  6e 32 24 29 0d 00 a0 40  e7 20 53 6b 69 70 5f 72  |n2$)...@. Skip_r|
00000120  65 73 74 25 3d 30 20 8c  20 6f 75 74 24 3d a4 5f  |est%=0 . out$=._|
00000130  74 72 61 6e 73 66 6f 72  6d 28 6d 61 74 63 68 24  |transform(match$|
00000140  2c 69 6e 32 24 29 20 8b  20 6f 75 74 24 3d 6d 61  |,in2$) . out$=ma|
00000150  74 63 68 24 0d 00 aa 0e  4c 61 73 74 24 3d 6f 75  |tch$....Last$=ou|
00000160  74 24 0d 00 b4 26 e7 20  a4 5f 6c 69 73 74 28 6f  |t$...&. ._list(o|
00000170  75 74 24 29 20 8c 20 6f  75 74 24 3d a4 5f 68 65  |ut$) . out$=._he|
00000180  61 64 28 6f 75 74 24 29  0d 00 be 16 f2 5f 70 72  |ad(out$)....._pr|
00000190  69 6e 74 28 30 2c 2d 31  2c 6f 75 74 24 29 0d 00  |int(0,-1,out$)..|
000001a0  c8 0a fd 20 45 6e 64 25  0d 00 d2 05 e0 0d 00 dc  |... End%........|
000001b0  05 3a 0d 00 e6 12 dd 20  f2 5f 73 65 74 75 70 5f  |.:..... ._setup_|
000001c0  70 72 6f 67 0d 00 f0 0c  de 20 4c 24 28 31 35 29  |prog..... L$(15)|
000001d0  0d 00 fa 7c 46 61 6d 69  6c 79 24 3d 22 2c 66 61  |...|Family$=",fa|
000001e0  6d 69 6c 79 2c 70 61 72  65 6e 74 2c 70 61 72 65  |mily,parent,pare|
000001f0  6e 74 73 2c 77 69 66 65  2c 68 75 73 62 61 6e 64  |nts,wife,husband|
00000200  2c 73 6f 6e 2c 73 6f 6e  73 2c 6d 6f 74 68 65 72  |,son,sons,mother|
00000210  2c 66 61 74 68 65 72 2c  73 69 73 74 65 72 2c 73  |,father,sister,s|
00000220  69 73 74 65 72 73 2c 62  72 6f 74 68 65 72 2c 62  |isters,brother,b|
00000230  72 6f 74 68 65 72 73 2c  64 61 75 67 68 74 65 72  |rothers,daughter|
00000240  2c 64 61 75 67 68 74 65  72 73 2c 22 0d 01 04 32  |,daughters,"...2|
00000250  52 75 64 65 24 3d 22 2c  69 64 69 6f 74 2c 73 74  |Rude$=",idiot,st|
00000260  75 70 69 64 2c 77 61 6c  6c 79 2c 74 77 69 74 2c  |upid,wally,twit,|
00000270  64 75 6d 62 2c 70 6c 6f  6e 6b 65 72 2c 22 0d 01  |dumb,plonker,"..|
00000280  0e 27 51 75 65 73 74 69  6f 6e 24 3d 22 2c 77 68  |.'Question$=",wh|
00000290  79 2c 77 68 61 74 2c 77  68 65 6e 2c 77 68 6f 2c  |y,what,when,who,|
000002a0  68 6f 77 2c 22 0d 01 18  35 4e 65 67 24 3d 22 2c  |how,"...5Neg$=",|
000002b0  6e 6f 74 2c 6e 6f 2c 77  6f 6e 74 2c 63 61 6e 74  |not,no,wont,cant|
000002c0  2c 64 6f 6e 74 2c 6e 65  76 65 72 2c 6e 6f 62 6f  |,dont,never,nobo|
000002d0  64 79 2c 6e 6f 6f 6e 65  2c 22 0d 01 22 45 46 72  |dy,noone,".."EFr|
000002e0  69 65 6e 64 73 24 3d 22  2c 62 6f 79 66 72 69 65  |iends$=",boyfrie|
000002f0  6e 64 2c 67 69 72 6c 66  72 69 65 6e 64 2c 66 72  |nd,girlfriend,fr|
00000300  69 65 6e 64 2c 66 72 69  65 6e 64 73 2c 6c 6f 76  |iend,friends,lov|
00000310  65 72 2c 6d 61 74 65 2c  6d 61 74 65 73 2c 22 0d  |er,mate,mates,".|
00000320  01 2c 32 47 6f 6f 64 5f  66 65 65 6c 69 6e 67 73  |.,2Good_feelings|
00000330  24 3d 22 2c 6c 69 6b 65  2c 6c 69 6b 65 73 2c 68  |$=",like,likes,h|
00000340  61 70 70 79 2c 6c 6f 76  65 2c 6c 6f 76 65 73 2c  |appy,love,loves,|
00000350  22 0d 01 36 4c 42 61 64  5f 66 65 65 6c 69 6e 67  |"..6LBad_feeling|
00000360  73 24 3d 22 2c 64 69 73  6c 69 6b 65 2c 64 69 73  |s$=",dislike,dis|
00000370  6c 69 6b 65 73 2c 75 6e  68 61 70 70 79 2c 68 61  |likes,unhappy,ha|
00000380  74 65 2c 68 61 74 65 73  2c 64 65 70 72 65 73 73  |te,hates,depress|
00000390  65 64 2c 73 75 69 63 69  64 61 6c 2c 22 0d 01 40  |ed,suicidal,"..@|
000003a0  3a 49 6d 70 6f 72 74 61  6e 74 24 3d 22 2c 6e 65  |:Important$=",ne|
000003b0  65 64 2c 6a 6f 62 2c 77  6f 72 6b 2c 75 6e 65 6d  |ed,job,work,unem|
000003c0  70 6c 6f 79 65 64 2c 68  6f 6d 65 2c 63 75 73 74  |ployed,home,cust|
000003d0  6f 6d 65 72 73 2c 22 0d  01 4a 36 47 72 65 65 74  |omers,"..J6Greet|
000003e0  69 6e 67 73 24 3d 22 2c  68 65 6c 6c 6f 2c 68 69  |ings$=",hello,hi|
000003f0  2c 67 6f 6f 64 62 79 65  2c 62 79 65 2c 63 68 65  |,goodbye,bye,che|
00000400  65 72 69 6f 2c 66 69 6e  69 73 68 2c 22 0d 01 54  |erio,finish,"..T|
00000410  cf 45 78 63 68 61 6e 67  65 24 3d 22 2f 2c 69 20  |.Exchange$="/,i |
00000420  61 6d 2c 79 6f 75 2e 20  61 72 65 2c 2f 2c 69 20  |am,you. are,/,i |
00000430  77 61 73 2c 79 6f 75 2e  20 77 65 72 65 2c 2f 2c  |was,you. were,/,|
00000440  79 6f 75 20 61 72 65 2c  49 20 61 6d 2c 2f 2c 79  |you are,I am,/,y|
00000450  6f 75 20 77 65 72 65 2c  49 20 77 61 73 2c 2f 2c  |ou were,I was,/,|
00000460  61 72 65 20 79 6f 75 2c  61 6d 20 49 2c 2f 2c 61  |are you,am I,/,a|
00000470  6d 20 69 2c 61 72 65 20  79 6f 75 2e 2c 2f 2c 77  |m i,are you.,/,w|
00000480  65 72 65 20 79 6f 75 2c  77 61 73 20 49 2c 2f 2c  |ere you,was I,/,|
00000490  77 61 73 20 69 2c 77 65  72 65 20 79 6f 75 2e 2c  |was i,were you.,|
000004a0  2f 2c 69 2c 79 6f 75 2e  2c 2f 2c 6d 65 2c 79 6f  |/,i,you.,/,me,yo|
000004b0  75 2e 2c 2f 2c 79 6f 75  2c 6d 65 2c 2f 2c 6d 79  |u.,/,you,me,/,my|
000004c0  2c 79 6f 75 72 2e 2c 2f  2c 75 73 2c 79 6f 75 2c  |,your.,/,us,you,|
000004d0  2f 2c 79 6f 75 72 2c 6d  79 2c 2f 22 0d 01 5e 28  |/,your,my,/"..^(|
000004e0  59 65 73 5f 6e 6f 24 3d  22 2c 79 65 73 2c 6e 6f  |Yes_no$=",yes,no|
000004f0  2c 6d 61 79 2c 6d 69 67  68 74 2c 70 65 72 68 61  |,may,might,perha|
00000500  70 73 2c 22 0d 01 68 27  4d 65 6e 74 69 6f 6e 65  |ps,"..h'Mentione|
00000510  64 24 3d 22 20 70 61 72  65 6e 74 73 20 22 20 3a  |d$=" parents " :|
00000520  20 4c 61 73 74 24 3d 22  2f 2f 22 0d 01 72 15 45  | Last$="//"..r.E|
00000530  6e 64 25 3d 30 20 3a 20  47 72 65 65 74 25 3d 30  |nd%=0 : Greet%=0|
00000540  0d 01 7c 42 54 72 61 63  65 25 3d 30 20 3a 20 f4  |..|BTrace%=0 : .|
00000550  20 63 68 61 6e 67 65 20  74 68 69 73 20 74 6f 20  | change this to |
00000560  54 72 61 63 65 25 3d 31  20 74 6f 20 74 75 72 6e  |Trace%=1 to turn|
00000570  20 6f 6e 20 74 72 61 63  65 20 6d 65 73 73 61 67  | on trace messag|
00000580  65 73 0d 01 86 05 e1 0d  01 90 05 3a 0d 01 9a 0d  |es.........:....|
00000590  dd 20 f2 5f 69 6e 74 72  6f 0d 01 a4 05 db 0d 01  |. ._intro.......|
000005a0  ae 33 f1 20 22 45 4c 49  5a 41 22 27 27 22 50 6c  |.3. "ELIZA"''"Pl|
000005b0  65 61 73 65 20 74 65 6c  6c 20 6d 65 20 61 62 6f  |ease tell me abo|
000005c0  75 74 20 79 6f 75 72 20  70 72 6f 62 6c 65 6d 73  |ut your problems|
000005d0  22 0d 01 b8 5c f2 5f 70  72 69 6e 74 28 30 2c 34  |"...\._print(0,4|
000005e0  2c 22 49 20 63 61 6e 27  74 20 67 75 61 72 61 6e  |,"I can't guaran|
000005f0  74 65 65 20 73 75 63 63  65 73 73 2c 20 62 75 74  |tee success, but|
00000600  20 6f 66 74 65 6e 20 69  74 20 68 65 6c 70 73 20  | often it helps |
00000610  6a 75 73 74 20 74 6f 20  74 61 6c 6b 20 70 72 6f  |just to talk pro|
00000620  62 6c 65 6d 73 20 6f 76  65 72 2e 22 29 0d 01 c2  |blems over.")...|
00000630  05 f1 0d 01 cc 05 e1 0d  01 d6 05 3a 0d 01 e0 0d  |...........:....|
00000640  dd 20 f2 5f 63 6c 65 61  72 0d 01 ea 32 45 78 63  |. ._clear...2Exc|
00000650  68 61 6e 67 65 73 25 3d  30 20 3a 20 52 75 64 65  |hanges%=0 : Rude|
00000660  25 3d 30 20 3a 20 53 6b  69 70 5f 72 65 73 74 25  |%=0 : Skip_rest%|
00000670  3d 30 20 3a 20 4e 65 67  25 3d 30 0d 01 f4 05 e1  |=0 : Neg%=0.....|
00000680  0d 01 fe 05 3a 0d 02 08  12 dd 20 a4 5f 69 6e 70  |....:..... ._inp|
00000690  75 74 5f 6c 69 6e 65 0d  02 12 0c ea 20 69 6e 24  |ut_line..... in$|
000006a0  2c 61 24 0d 02 1c 05 f5  0d 02 26 0b f1 20 22 3e  |,a$.......&.. ">|
000006b0  3e 22 3b 0d 02 30 09 69  6e 24 3d be 0d 02 3a 0a  |>";..0.in$=...:.|
000006c0  f1 20 69 6e 24 3b 0d 02  44 0e fd 20 69 6e 24 3c  |. in$;..D.. in$<|
000006d0  3e bd 31 33 0d 02 4e 05  f5 0d 02 58 15 61 24 3d  |>.13..N....X.a$=|
000006e0  bf 28 33 30 30 30 29 20  3a 20 f1 61 24 3b 0d 02  |.(3000) : .a$;..|
000006f0  62 18 e7 20 61 24 3c 3e  bd 31 33 20 69 6e 24 3d  |b.. a$<>.13 in$=|
00000700  69 6e 24 2b 61 24 0d 02  6c 20 e7 20 61 24 3d bd  |in$+a$..l . a$=.|
00000710  31 32 37 20 69 6e 24 3d  c0 69 6e 24 2c a9 28 69  |127 in$=.in$,.(i|
00000720  6e 24 29 2d 32 29 0d 02  76 2f fd 20 61 24 3d bd  |n$)-2)..v/. a$=.|
00000730  31 33 20 84 20 61 24 3d  22 22 20 84 20 61 24 3d  |13 . a$="" . a$=|
00000740  22 2e 22 20 84 20 61 24  3d 22 21 22 20 84 20 61  |"." . a$="!" . a|
00000750  24 3d 22 3f 22 0d 02 80  05 f1 0d 02 8a 09 3d 20  |$="?".........= |
00000760  69 6e 24 0d 02 94 05 3a  0d 02 9e 11 dd 20 a4 5f  |in$....:..... ._|
00000770  74 69 64 79 28 69 6e 24  29 0d 02 a8 13 ea 20 61  |tidy(in$)..... a|
00000780  24 2c 61 25 2c 6e 25 2c  6f 75 74 24 0d 02 b2 0c  |$,a%,n%,out$....|
00000790  6f 75 74 24 3d 22 20 22  0d 02 bc 13 e3 20 6e 25  |out$=" "..... n%|
000007a0  3d 31 20 b8 20 a9 28 69  6e 24 29 0d 02 c6 1a 61  |=1 . .(in$)....a|
000007b0  24 3d c1 69 6e 24 2c 6e  25 2c 31 29 3a 61 25 3d  |$=.in$,n%,1):a%=|
000007c0  97 28 61 24 29 0d 02 d0  28 e7 20 61 25 3e 36 34  |.(a$)...(. a%>64|
000007d0  20 80 20 61 25 3c 39 31  20 8c 20 6f 75 74 24 3d  | . a%<91 . out$=|
000007e0  6f 75 74 24 2b bd 28 61  25 2b 33 32 29 0d 02 da  |out$+.(a%+32)...|
000007f0  37 e7 20 28 61 25 3e 39  36 20 80 20 61 25 3c 31  |7. (a%>96 . a%<1|
00000800  32 37 29 20 84 20 28 61  25 3e 34 37 20 80 20 61  |27) . (a%>47 . a|
00000810  25 3c 35 38 29 20 8c 20  6f 75 74 24 3d 6f 75 74  |%<58) . out$=out|
00000820  24 2b 61 24 0d 02 e4 2b  e7 20 61 25 3d 33 32 20  |$+a$...+. a%=32 |
00000830  80 20 c2 6f 75 74 24 2c  31 29 3c 3e 22 20 22 20  |. .out$,1)<>" " |
00000840  8c 20 6f 75 74 24 3d 6f  75 74 24 2b 22 20 22 0d  |. out$=out$+" ".|
00000850  02 ee 05 ed 0d 02 f8 0e  3d 20 6f 75 74 24 2b 22  |........= out$+"|
00000860  20 22 0d 03 02 05 3a 0d  03 0c 15 dd 20 a4 5f 65  | "....:..... ._e|
00000870  78 63 68 61 6e 67 65 28  69 6e 24 29 0d 03 16 28  |xchange(in$)...(|
00000880  ea 20 6e 25 2c 6d 25 2c  6d 31 25 2c 6d 32 25 2c  |. n%,m%,m1%,m2%,|
00000890  6a 25 2c 6f 75 74 24 2c  73 65 70 24 2c 6c 31 24  |j%,out$,sep$,l1$|
000008a0  2c 6c 32 24 0d 03 20 1b  73 65 70 24 3d c0 69 6e  |,l2$.. .sep$=.in|
000008b0  24 2c 31 29 20 3a 20 6f  75 74 24 3d 69 6e 24 0d  |$,1) : out$=in$.|
000008c0  03 2a 1a 6d 25 3d a4 5f  75 6e 6c 69 73 74 28 45  |.*.m%=._unlist(E|
000008d0  78 63 68 61 6e 67 65 24  29 0d 03 34 0e e3 6e 25  |xchange$)..4..n%|
000008e0  3d 31 20 b8 20 6d 25 0d  03 3e 23 e7 20 6e 25 3e  |=1 . m%..>#. n%>|
000008f0  31 20 8c 20 6d 25 3d a4  5f 75 6e 6c 69 73 74 28  |1 . m%=._unlist(|
00000900  45 78 63 68 61 6e 67 65  24 29 0d 03 48 18 6d 31  |Exchange$)..H.m1|
00000910  25 3d a4 5f 75 6e 6c 69  73 74 28 4c 24 28 6e 25  |%=._unlist(L$(n%|
00000920  29 29 0d 03 52 19 6c 31  24 3d 4c 24 28 31 29 20  |))..R.l1$=L$(1) |
00000930  3a 20 6c 32 24 3d 4c 24  28 32 29 0d 03 5c 37 e7  |: l2$=L$(2)..\7.|
00000940  20 a9 28 6c 31 24 29 2b  32 3c a9 28 6f 75 74 24  | .(l1$)+2<.(out$|
00000950  29 20 8c 20 6a 25 3d a7  6f 75 74 24 2c 73 65 70  |) . j%=.out$,sep|
00000960  24 2b 6c 31 24 2b 73 65  70 24 29 20 8b 20 6a 25  |$+l1$+sep$) . j%|
00000970  3d 30 0d 03 66 51 e7 20  6a 25 3e 30 20 8c 20 6f  |=0..fQ. j%>0 . o|
00000980  75 74 24 3d c0 6f 75 74  24 2c 6a 25 29 2b 6c 32  |ut$=.out$,j%)+l2|
00000990  24 2b c2 6f 75 74 24 2c  a9 28 6f 75 74 24 29 2d  |$+.out$,.(out$)-|
000009a0  a9 28 6c 31 24 29 2d 6a  25 29 20 3a 20 45 78 63  |.(l1$)-j%) : Exc|
000009b0  68 6e 67 65 73 25 3d 45  78 63 68 61 6e 67 65 73  |hnges%=Exchanges|
000009c0  25 2b 31 0d 03 70 05 ed  0d 03 7a 32 6d 25 3d a4  |%+1..p....z2m%=.|
000009d0  5f 75 6e 6c 69 73 74 28  22 2e 22 2b 6f 75 74 24  |_unlist("."+out$|
000009e0  2b 22 2e 22 29 3a 6f 75  74 24 3d a4 5f 65 6e 6c  |+"."):out$=._enl|
000009f0  69 73 74 28 6d 25 2c 22  22 29 0d 03 84 0a 3d 20  |ist(m%,"")....= |
00000a00  6f 75 74 24 0d 03 8e 05  3a 0d 03 98 12 dd 20 a4  |out$....:..... .|
00000a10  5f 6d 61 74 63 68 28 69  6e 24 29 0d 03 a2 21 ea  |_match(in$)...!.|
00000a20  20 77 6f 72 64 73 25 2c  67 72 65 65 74 24 2c 6b  | words%,greet$,k|
00000a30  65 79 5f 77 6f 72 64 73  24 2c 73 24 0d 03 ac 18  |ey_words$,s$....|
00000a40  77 6f 72 64 73 25 3d a4  5f 75 6e 6c 69 73 74 28  |words%=._unlist(|
00000a50  69 6e 24 29 0d 03 b6 54  e7 20 77 6f 72 64 73 25  |in$)...T. words%|
00000a60  3d 30 20 8c 20 53 6b 69  70 5f 72 65 73 74 25 3d  |=0 . Skip_rest%=|
00000a70  31 20 3a 20 3d 20 22 49  27 6d 20 6e 6f 74 20 74  |1 : = "I'm not t|
00000a80  65 6c 65 70 61 74 68 69  63 20 20 2d 20 70 6c 65  |elepathic  - ple|
00000a90  61 73 65 20 74 79 70 65  20 69 6e 20 73 6f 6d 65  |ase type in some|
00000aa0  20 57 4f 52 44 53 21 22  0d 03 c0 29 67 72 65 65  | WORDS!"...)gree|
00000ab0  74 24 3d a4 5f 69 6e 74  65 72 73 65 63 74 69 6f  |t$=._intersectio|
00000ac0  6e 28 47 72 65 65 74 69  6e 67 73 24 2c 69 6e 24  |n(Greetings$,in$|
00000ad0  29 0d 03 ca 2d e7 20 a9  28 67 72 65 65 74 24 29  |)...-. .(greet$)|
00000ae0  3e 32 20 8c 20 3d 20 a4  5f 67 72 65 65 74 28 a4  |>2 . = ._greet(.|
00000af0  5f 68 65 61 64 28 67 72  65 65 74 24 29 29 0d 03  |_head(greet$))..|
00000b00  d4 3e e7 20 a9 28 a4 5f  69 6e 74 65 72 73 65 63  |.>. .(._intersec|
00000b10  74 69 6f 6e 28 52 75 64  65 24 2c 69 6e 24 29 29  |tion(Rude$,in$))|
00000b20  3e 32 20 8c 20 53 6b 69  70 5f 72 65 73 74 25 3d  |>2 . Skip_rest%=|
00000b30  31 20 3a 20 3d 20 a4 5f  72 75 64 65 0d 03 de 33  |1 : = ._rude...3|
00000b40  73 24 3d a4 5f 69 6e 74  65 72 73 65 63 74 69 6f  |s$=._intersectio|
00000b50  6e 28 4e 65 67 24 2c 69  6e 24 29 20 3a 20 4e 65  |n(Neg$,in$) : Ne|
00000b60  67 25 3d a4 5f 75 6e 6c  69 73 74 28 73 24 29 0d  |g%=._unlist(s$).|
00000b70  03 e8 22 73 24 3d a4 5f  69 6e 74 65 72 73 65 63  |.."s$=._intersec|
00000b80  74 69 6f 6e 28 59 65 73  5f 6e 6f 24 2c 69 6e 24  |tion(Yes_no$,in$|
00000b90  29 0d 03 f2 26 e7 20 a9  28 73 24 29 3e 32 20 8c  |)...&. .(s$)>2 .|
00000ba0  20 3d 20 a4 5f 79 65 73  5f 6e 6f 28 a4 5f 68 65  | = ._yes_no(._he|
00000bb0  61 64 28 73 24 29 29 0d  03 fc 1f 6b 65 79 5f 77  |ad(s$))....key_w|
00000bc0  6f 72 64 73 24 3d a4 5f  6b 65 79 5f 77 6f 72 64  |ords$=._key_word|
00000bd0  73 28 69 6e 24 29 0d 04  06 30 4d 65 6e 74 69 6f  |s(in$)...0Mentio|
00000be0  6e 65 64 24 3d a4 5f 61  64 64 5f 6c 69 73 74 28  |ned$=._add_list(|
00000bf0  6b 65 79 5f 77 6f 72 64  73 24 2c 4d 65 6e 74 69  |key_words$,Menti|
00000c00  6f 6e 65 64 24 29 0d 04  10 3d e7 20 a4 5f 75 6e  |oned$)...=. ._un|
00000c10  6c 69 73 74 28 4d 65 6e  74 69 6f 6e 65 64 24 29  |list(Mentioned$)|
00000c20  3e 31 33 20 8c 20 4d 65  6e 74 69 6f 6e 65 64 24  |>13 . Mentioned$|
00000c30  3d a4 5f 74 61 69 6c 28  4d 65 6e 74 69 6f 6e 65  |=._tail(Mentione|
00000c40  64 24 29 0d 04 1a 2b 71  75 65 73 74 69 6f 6e 24  |d$)...+question$|
00000c50  3d a4 5f 69 6e 74 65 72  73 65 63 74 69 6f 6e 28  |=._intersection(|
00000c60  51 75 65 73 74 69 6f 6e  24 2c 69 6e 24 29 0d 04  |Question$,in$)..|
00000c70  24 45 e7 20 a9 28 71 75  65 73 74 69 6f 6e 24 29  |$E. .(question$)|
00000c80  3e 32 20 84 20 51 75 65  73 74 69 6f 6e 25 3d 31  |>2 . Question%=1|
00000c90  20 8c 20 53 6b 69 70 5f  72 65 73 74 25 3d 31 20  | . Skip_rest%=1 |
00000ca0  3a 20 3d 20 a4 5f 71 75  65 73 74 69 6f 6e 28 69  |: = ._question(i|
00000cb0  6e 24 29 0d 04 2e 10 3d  20 6b 65 79 5f 77 6f 72  |n$)....= key_wor|
00000cc0  64 73 24 0d 04 38 05 3a  0d 04 42 16 dd 20 a4 5f  |ds$..8.:..B.. ._|
00000cd0  6b 65 79 5f 77 6f 72 64  73 28 69 6e 24 29 0d 04  |key_words(in$)..|
00000ce0  4c 12 ea 20 6b 65 79 24  2c 73 65 70 24 2c 69 24  |L.. key$,sep$,i$|
00000cf0  0d 04 56 0d 6b 65 79 24  3d 22 2f 2f 22 0d 04 60  |..V.key$="//"..`|
00000d00  36 6b 65 79 24 3d a4 5f  61 64 64 5f 6c 69 73 74  |6key$=._add_list|
00000d10  28 a4 5f 69 6e 74 65 72  73 65 63 74 69 6f 6e 28  |(._intersection(|
00000d20  46 61 6d 69 6c 79 24 2c  69 6e 24 29 2c 20 6b 65  |Family$,in$), ke|
00000d30  79 24 29 0d 04 6a 3d 6b  65 79 24 3d a4 5f 61 64  |y$)..j=key$=._ad|
00000d40  64 5f 6c 69 73 74 28 a4  5f 69 6e 74 65 72 73 65  |d_list(._interse|
00000d50  63 74 69 6f 6e 28 47 6f  6f 64 5f 66 65 65 6c 69  |ction(Good_feeli|
00000d60  6e 67 73 24 2c 69 6e 24  29 2c 20 6b 65 79 24 29  |ngs$,in$), key$)|
00000d70  0d 04 74 3c 6b 65 79 24  3d a4 5f 61 64 64 5f 6c  |..t<key$=._add_l|
00000d80  69 73 74 28 a4 5f 69 6e  74 65 72 73 65 63 74 69  |ist(._intersecti|
00000d90  6f 6e 28 42 61 64 5f 66  65 65 6c 69 6e 67 73 24  |on(Bad_feelings$|
00000da0  2c 69 6e 24 29 2c 20 6b  65 79 24 29 0d 04 7e 39  |,in$), key$)..~9|
00000db0  6b 65 79 24 3d a4 5f 61  64 64 5f 6c 69 73 74 28  |key$=._add_list(|
00000dc0  a4 5f 69 6e 74 65 72 73  65 63 74 69 6f 6e 28 49  |._intersection(I|
00000dd0  6d 70 6f 72 74 61 6e 74  24 2c 69 6e 24 29 2c 20  |mportant$,in$), |
00000de0  6b 65 79 24 29 0d 04 88  37 6b 65 79 24 3d a4 5f  |key$)...7key$=._|
00000df0  61 64 64 5f 6c 69 73 74  28 a4 5f 69 6e 74 65 72  |add_list(._inter|
00000e00  73 65 63 74 69 6f 6e 28  46 72 69 65 6e 64 73 24  |section(Friends$|
00000e10  2c 69 6e 24 29 2c 20 6b  65 79 24 29 0d 04 92 0a  |,in$), key$)....|
00000e20  3d 20 6b 65 79 24 0d 04  9c 05 3a 0d 04 a6 1d dd  |= key$....:.....|
00000e30  20 a4 5f 74 72 61 6e 73  66 6f 72 6d 28 6d 61 74  | ._transform(mat|
00000e40  63 68 24 2c 69 6e 24 29  0d 04 b0 0b ea 20 6d 25  |ch$,in$)..... m%|
00000e50  2c 6e 25 0d 04 ba 17 6d  25 3d a4 5f 75 6e 6c 69  |,n%....m%=._unli|
00000e60  73 74 28 6d 61 74 63 68  24 29 0d 04 c4 27 e7 20  |st(match$)...'. |
00000e70  28 6d 25 3d 30 20 80 20  45 78 63 68 61 6e 67 65  |(m%=0 . Exchange|
00000e80  73 25 3d 30 29 20 8c 20  3d 20 a4 5f 62 6c 75 66  |s%=0) . = ._bluf|
00000e90  66 0d 04 ce 1d e7 20 6d  25 3d 30 20 8c 20 3d 20  |f..... m%=0 . = |
00000ea0  a4 5f 72 65 73 74 61 74  65 28 69 6e 24 29 0d 04  |._restate(in$)..|
00000eb0  d8 1c e7 20 6d 25 3e 31  20 8c 20 72 25 3d b3 28  |... m%>1 . r%=.(|
00000ec0  6d 25 29 20 8b 20 72 25  3d 31 0d 04 e2 0d 77 24  |m%) . r%=1....w$|
00000ed0  3d 4c 24 28 72 25 29 0d  04 ec 2d e7 20 a4 5f 6d  |=L$(r%)...-. ._m|
00000ee0  65 6d 62 65 72 28 77 24  2c 46 61 6d 69 6c 79 24  |ember(w$,Family$|
00000ef0  29 3e 30 20 8c 20 3d 20  a4 5f 66 61 6d 69 6c 79  |)>0 . = ._family|
00000f00  28 77 24 29 0d 04 f6 32  e7 20 a4 5f 6d 65 6d 62  |(w$)...2. ._memb|
00000f10  65 72 28 77 24 2c 47 6f  6f 64 5f 66 65 65 6c 69  |er(w$,Good_feeli|
00000f20  6e 67 73 24 29 3e 30 20  8c 20 3d 20 a4 5f 67 6f  |ngs$)>0 . = ._go|
00000f30  6f 64 28 77 24 29 0d 05  00 30 e7 20 a4 5f 6d 65  |od(w$)...0. ._me|
00000f40  6d 62 65 72 28 77 24 2c  42 61 64 5f 66 65 65 6c  |mber(w$,Bad_feel|
00000f50  69 6e 67 73 24 29 3e 30  20 8c 20 3d 20 a4 5f 62  |ings$)>0 . = ._b|
00000f60  61 64 28 77 24 29 0d 05  0a 33 e7 20 a4 5f 6d 65  |ad(w$)...3. ._me|
00000f70  6d 62 65 72 28 77 24 2c  49 6d 70 6f 72 74 61 6e  |mber(w$,Importan|
00000f80  74 24 29 3e 30 20 8c 20  3d 20 a4 5f 69 6d 70 6f  |t$)>0 . = ._impo|
00000f90  72 74 61 6e 74 28 77 24  29 0d 05 14 2f e7 20 a4  |rtant(w$).../. .|
00000fa0  5f 6d 65 6d 62 65 72 28  77 24 2c 46 72 69 65 6e  |_member(w$,Frien|
00000fb0  64 73 24 29 3e 30 20 8c  20 3d 20 a4 5f 66 72 69  |ds$)>0 . = ._fri|
00000fc0  65 6e 64 73 28 77 24 29  0d 05 1e 09 3d 20 69 6e  |ends(w$)....= in|
00000fd0  24 0d 05 28 05 3a 0d 05  32 11 dd 20 a4 5f 67 72  |$..(.:..2.. ._gr|
00000fe0  65 65 74 28 77 24 29 0d  05 3c 10 53 6b 69 70 5f  |eet(w$)..<.Skip_|
00000ff0  72 65 73 74 25 3d 31 0d  05 46 67 e7 20 77 24 3d  |rest%=1..Fg. w$=|
00001000  22 68 65 6c 6c 6f 22 20  84 20 77 24 3d 22 68 69  |"hello" . w$="hi|
00001010  22 20 8c 20 77 24 3d 22  68 65 6c 6c 6f 22 20 3a  |" . w$="hello" :|
00001020  20 e7 20 47 72 65 65 74  25 3d 30 20 8c 20 47 72  | . Greet%=0 . Gr|
00001030  65 65 74 25 3d 31 20 3a  20 3d 20 77 24 20 8b 20  |eet%=1 : = w$ . |
00001040  e7 20 77 24 3d 22 68 65  6c 6c 6f 22 20 8c 20 3d  |. w$="hello" . =|
00001050  20 22 68 65 6c 6c 6f 20  61 67 61 69 6e 22 0d 05  | "hello again"..|
00001060  50 47 45 6e 64 25 3d 31  20 3a 20 3d 20 22 47 6f  |PGEnd%=1 : = "Go|
00001070  6f 64 62 79 65 2c 20 49  20 68 6f 70 65 20 74 68  |odbye, I hope th|
00001080  61 74 20 79 6f 75 20 77  69 6c 6c 20 74 72 79 20  |at you will try |
00001090  61 6e 6f 74 68 65 72 20  73 65 73 73 69 6f 6e 20  |another session |
000010a0  73 6f 6f 6e 22 0d 05 5a  05 3a 0d 05 64 0c dd 20  |soon"..Z.:..d.. |
000010b0  a4 5f 72 75 64 65 0d 05  6e 16 e7 20 54 72 61 63  |._rude..n.. Trac|
000010c0  65 25 20 8c 20 f1 22 52  55 44 45 22 0d 05 78 0c  |e% . ."RUDE"..x.|
000010d0  72 25 3d b3 28 31 30 29  0d 05 82 10 53 6b 69 70  |r%=.(10)....Skip|
000010e0  5f 72 65 73 74 25 3d 31  0d 05 8c 7d e7 20 72 25  |_rest%=1...}. r%|
000010f0  3c 36 20 8c 20 3d 20 22  50 6c 65 61 73 65 20 72  |<6 . = "Please r|
00001100  65 6d 61 69 6e 20 63 61  6c 6d 22 20 8b 20 e7 20  |emain calm" . . |
00001110  72 25 3c 39 20 8c 20 3d  20 22 54 68 65 72 65 27  |r%<9 . = "There'|
00001120  73 20 6e 6f 20 6e 65 65  64 20 66 6f 72 20 74 68  |s no need for th|
00001130  61 74 20 73 6f 72 74 20  6f 66 20 6c 61 6e 67 75  |at sort of langu|
00001140  61 67 65 22 20 8b 20 3d  20 22 44 6f 6e 27 74 20  |age" . = "Don't |
00001150  73 77 65 61 72 20 61 74  20 6d 65 20 73 75 6e 73  |swear at me suns|
00001160  68 69 6e 65 22 0d 05 96  05 3a 0d 05 a0 0d dd 20  |hine"....:..... |
00001170  a4 5f 62 6c 75 66 66 0d  05 aa 12 ea 20 6e 25 2c  |._bluff..... n%,|
00001180  70 72 65 76 69 6f 75 73  24 0d 05 b4 17 e7 20 54  |previous$..... T|
00001190  72 61 63 65 25 20 8c 20  f1 22 42 4c 55 46 46 22  |race% . ."BLUFF"|
000011a0  0d 05 be 21 e7 20 a4 5f  75 6e 6c 69 73 74 28 4c  |...!. ._unlist(L|
000011b0  61 73 74 24 29 3e 30 20  8c 20 3d 20 4c 24 28 32  |ast$)>0 . = L$(2|
000011c0  29 0d 05 c8 0c 6e 25 3d  b3 28 31 35 29 0d 05 d2  |)....n%=.(15)...|
000011d0  1e e7 20 6e 25 3c 3d 33  20 8c 20 3d 20 22 50 6c  |.. n%<=3 . = "Pl|
000011e0  65 61 73 65 20 67 6f 20  6f 6e 22 0d 05 dc 5e e7  |ease go on"...^.|
000011f0  20 6e 25 3c 3d 34 20 8c  20 45 6e 64 25 3d 31 20  | n%<=4 . End%=1 |
00001200  3a 20 3d 20 22 49 27 6d  20 73 6f 72 72 79 2c 20  |: = "I'm sorry, |
00001210  49 20 68 61 76 65 20 74  6f 20 67 6f 20 6e 6f 77  |I have to go now|
00001220  2e 20 49 20 68 6f 70 65  20 79 6f 75 20 68 61 76  |. I hope you hav|
00001230  65 20 66 6f 75 6e 64 20  6f 75 72 20 63 68 61 74  |e found our chat|
00001240  20 68 65 6c 70 66 75 6c  22 0d 05 e6 58 e7 20 6e  | helpful"...X. n|
00001250  25 3c 3d 38 20 8c 20 3d  20 22 2f 44 6f 20 79 6f  |%<=8 . = "/Do yo|
00001260  75 20 68 61 76 65 20 61  6e 79 20 77 6f 72 72 69  |u have any worri|
00001270  65 73 20 61 62 6f 75 74  20 79 6f 75 72 20 77 6f  |es about your wo|
00001280  72 6b 3f 2f 54 65 6c 6c  20 6d 65 20 61 62 6f 75  |rk?/Tell me abou|
00001290  74 20 79 6f 75 72 20 77  6f 72 72 69 65 73 2e 2f  |t your worries./|
000012a0  22 0d 05 f0 42 e7 20 6e  25 3c 3d 31 30 20 8c 20  |"...B. n%<=10 . |
000012b0  3d 20 22 57 68 6f 20 61  72 65 20 74 68 65 20 6d  |= "Who are the m|
000012c0  6f 73 74 20 69 6d 70 6f  72 74 61 6e 74 20 70 65  |ost important pe|
000012d0  6f 70 6c 65 20 69 6e 20  79 6f 75 72 20 6c 69 66  |ople in your lif|
000012e0  65 3f 22 0d 05 fa 1b 6d  25 3d a4 5f 75 6e 6c 69  |e?"....m%=._unli|
000012f0  73 74 28 4d 65 6e 74 69  6f 6e 65 64 24 29 0d 06  |st(Mentioned$)..|
00001300  04 1c e7 20 6d 25 3e 31  20 8c 20 6e 25 3d b3 28  |... m%>1 . n%=.(|
00001310  6d 25 29 20 8b 20 6e 25  3d 31 0d 06 0e 14 70 72  |m%) . n%=1....pr|
00001320  65 76 69 6f 75 73 24 3d  4c 24 28 6e 25 29 0d 06  |evious$=L$(n%)..|
00001330  18 89 e7 20 a4 5f 6d 65  6d 62 65 72 28 70 72 65  |... ._member(pre|
00001340  76 69 6f 75 73 24 2c 42  61 64 5f 66 65 65 6c 69  |vious$,Bad_feeli|
00001350  6e 67 73 24 29 20 8c 20  3d 20 22 4c 65 74 27 73  |ngs$) . = "Let's|
00001360  20 67 6f 20 62 61 63 6b  20 74 6f 20 79 6f 75 72  | go back to your|
00001370  20 6e 65 67 61 74 69 76  65 20 65 6d 6f 74 69 6f  | negative emotio|
00001380  6e 73 3a 22 2b bd 31 33  2b bd 31 30 2b 22 54 65  |ns:"+.13+.10+"Te|
00001390  6c 6c 20 6d 65 20 61 62  6f 75 74 20 79 6f 75 72  |ll me about your|
000013a0  20 66 65 65 6c 69 6e 67  20 6f 66 20 22 2b 70 72  | feeling of "+pr|
000013b0  65 76 69 6f 75 73 24 0d  06 22 31 3d 20 22 50 6c  |evious$.."1= "Pl|
000013c0  65 61 73 65 20 74 65 6c  6c 20 6d 65 20 6d 6f 72  |ease tell me mor|
000013d0  65 20 61 62 6f 75 74 20  79 6f 75 72 20 22 2b 70  |e about your "+p|
000013e0  72 65 76 69 6f 75 73 24  0d 06 2c 05 3a 0d 06 36  |revious$..,.:..6|
000013f0  14 dd 20 a4 5f 72 65 73  74 61 74 65 28 69 6e 24  |.. ._restate(in$|
00001400  29 0d 06 40 0e ea 20 6d  25 2c 6e 25 2c 73 25 0d  |)..@.. m%,n%,s%.|
00001410  06 4a 1a e7 20 54 72 61  63 65 25 20 8c 20 f1 20  |.J.. Trace% . . |
00001420  22 52 45 53 54 41 54 45  22 0d 06 54 21 e7 20 a4  |"RESTATE"..T!. .|
00001430  5f 75 6e 6c 69 73 74 28  4c 61 73 74 24 29 3e 30  |_unlist(Last$)>0|
00001440  20 8c 20 3d 20 4c 24 28  32 29 0d 06 5e 18 69 6e  | . = L$(2)..^.in|
00001450  24 3d c1 69 6e 24 2c 32  2c a9 28 69 6e 24 29 2d  |$=.in$,2,.(in$)-|
00001460  32 29 0d 06 68 36 e7 20  b3 28 32 29 3d 31 20 8c  |2)..h6. .(2)=1 .|
00001470  20 3d 20 69 6e 24 2b 22  3f 22 20 8b 20 3d 20 22  | = in$+"?" . = "|
00001480  77 68 79 20 64 6f 20 79  6f 75 20 73 61 79 20 22  |why do you say "|
00001490  2b 69 6e 24 2b 22 3f 22  0d 06 72 05 3a 0d 06 7c  |+in$+"?"..r.:..||
000014a0  12 dd 20 a4 5f 66 61 6d  69 6c 79 28 77 24 29 0d  |.. ._family(w$).|
000014b0  06 86 19 e7 20 54 72 61  63 65 25 20 8c 20 f1 20  |.... Trace% . . |
000014c0  22 46 41 4d 49 4c 59 22  0d 06 90 0b 72 25 3d b3  |"FAMILY"....r%=.|
000014d0  28 35 29 0d 06 9a 2c e7  20 72 25 3d 31 20 8c 20  |(5)...,. r%=1 . |
000014e0  3d 20 22 54 65 6c 6c 20  6d 65 20 6d 6f 72 65 20  |= "Tell me more |
000014f0  61 62 6f 75 74 20 79 6f  75 72 20 22 2b 77 24 0d  |about your "+w$.|
00001500  06 a4 30 e7 20 72 25 3d  32 20 8c 20 3d 20 22 54  |..0. r%=2 . = "T|
00001510  65 6c 6c 20 6d 65 20 6d  6f 72 65 20 61 62 6f 75  |ell me more abou|
00001520  74 20 79 6f 75 72 20 70  61 72 65 6e 74 73 22 0d  |t your parents".|
00001530  06 ae 49 e7 20 72 25 3d  33 20 8c 20 3d 20 22 2f  |..I. r%=3 . = "/|
00001540  44 6f 20 79 6f 75 20 68  61 76 65 20 61 20 6c 61  |Do you have a la|
00001550  72 67 65 20 66 61 6d 69  6c 79 3f 2f 57 68 6f 20  |rge family?/Who |
00001560  69 73 20 74 68 65 20 63  6c 6f 73 65 73 74 20 74  |is the closest t|
00001570  6f 20 79 6f 75 3f 2f 22  0d 06 b8 50 e7 20 72 25  |o you?/"...P. r%|
00001580  3d 34 20 8c 20 3d 20 22  49 73 20 79 6f 75 72 20  |=4 . = "Is your |
00001590  66 61 6d 69 6c 79 20 76  65 72 79 20 69 6d 70 6f  |family very impo|
000015a0  72 74 61 6e 74 20 74 6f  20 79 6f 75 3f 2f 57 68  |rtant to you?/Wh|
000015b0  6f 20 64 6f 20 79 6f 75  20 6c 69 6b 65 20 74 68  |o do you like th|
000015c0  65 20 62 65 73 74 3f 22  0d 06 c2 3e e7 20 72 25  |e best?"...>. r%|
000015d0  3d 35 20 8c 20 3d 20 22  49 74 27 73 20 68 61 72  |=5 . = "It's har|
000015e0  64 20 74 6f 20 6b 65 65  70 20 6f 6e 20 67 6f 6f  |d to keep on goo|
000015f0  64 20 74 65 72 6d 73 20  77 69 74 68 20 65 76 65  |d terms with eve|
00001600  72 79 6f 6e 65 22 0d 06  cc 05 3a 0d 06 d6 10 dd  |ryone"....:.....|
00001610  20 a4 5f 67 6f 6f 64 28  77 24 29 0d 06 e0 20 e7  | ._good(w$)... .|
00001620  20 54 72 61 63 65 25 20  8c 20 f1 20 22 47 4f 4f  | Trace% . . "GOO|
00001630  44 20 46 45 45 4c 49 4e  47 53 22 0d 06 ea 24 e7  |D FEELINGS"...$.|
00001640  20 4e 65 67 25 3d 31 20  8c 20 4e 65 67 25 3d 2d  | Neg%=1 . Neg%=-|
00001650  31 20 3a 20 3d 20 a4 5f  62 61 64 28 77 24 29 0d  |1 : = ._bad(w$).|
00001660  06 f4 1c 3d 20 22 49 20  61 6d 20 67 6c 61 64 20  |...= "I am glad |
00001670  74 6f 20 68 65 61 72 20  69 74 22 0d 06 fe 05 3a  |to hear it"....:|
00001680  0d 07 08 15 dd 20 a4 5f  69 6d 70 6f 72 74 61 6e  |..... ._importan|
00001690  74 28 77 24 29 0d 07 12  1c e7 20 54 72 61 63 65  |t(w$)..... Trace|
000016a0  25 20 8c 20 f1 20 22 49  4d 50 4f 52 54 41 4e 54  |% . . "IMPORTANT|
000016b0  22 0d 07 1c 0c 72 25 3d  b3 28 31 30 29 0d 07 26  |"....r%=.(10)..&|
000016c0  2d e7 20 72 25 3d 31 20  8c 20 3d 20 22 59 6f 75  |-. r%=1 . = "You|
000016d0  27 72 65 20 72 69 67 68  74 20 74 6f 20 62 65 20  |'re right to be |
000016e0  63 6f 6e 63 65 72 6e 65  64 22 0d 07 30 29 e7 20  |concerned"..0). |
000016f0  72 25 3d 32 20 8c 20 3d  20 22 54 69 6d 65 73 20  |r%=2 . = "Times |
00001700  61 72 65 20 76 65 72 79  20 64 69 66 66 69 63 75  |are very difficu|
00001710  6c 74 22 0d 07 3a 33 e7  20 72 25 3d 33 20 8c 20  |lt"..:3. r%=3 . |
00001720  3d 20 22 49 20 74 68 69  6e 6b 20 74 68 65 20 67  |= "I think the g|
00001730  6f 76 65 72 6e 6d 65 6e  74 20 69 73 20 74 6f 20  |overnment is to |
00001740  62 6c 61 6d 65 22 0d 07  44 47 e7 20 72 25 3c 39  |blame"..DG. r%<9|
00001750  20 80 20 77 24 3c 3e 22  75 6e 65 6d 70 6c 6f 79  | . w$<>"unemploy|
00001760  65 64 22 20 80 20 77 24  3c 3e 22 6e 65 65 64 22  |ed" . w$<>"need"|
00001770  20 8c 20 3d 20 22 54 65  6c 6c 20 6d 65 20 61 62  | . = "Tell me ab|
00001780  6f 75 74 20 79 6f 75 72  20 22 2b 77 24 0d 07 4e  |out your "+w$..N|
00001790  36 3d 20 22 48 6f 77 20  61 72 65 20 79 6f 75 72  |6= "How are your|
000017a0  20 66 61 6d 69 6c 79 20  72 65 61 63 74 69 6e 67  | family reacting|
000017b0  20 74 6f 20 74 68 65 20  73 69 74 75 61 74 69 6f  | to the situatio|
000017c0  6e 3f 22 0d 07 58 05 3a  0d 07 62 13 dd 20 a4 5f  |n?"..X.:..b.. ._|
000017d0  66 72 69 65 6e 64 73 28  77 24 29 0d 07 6c 19 e7  |friends(w$)..l..|
000017e0  20 54 72 61 63 65 25 20  8c 20 f1 22 46 52 49 45  | Trace% . ."FRIE|
000017f0  4e 44 53 22 0d 07 76 0c  72 25 3d b3 28 31 30 29  |NDS"..v.r%=.(10)|
00001800  0d 07 80 43 e7 20 72 25  3c 3d 34 20 8c 20 3d 20  |...C. r%<=4 . = |
00001810  22 57 68 61 74 20 73 6f  72 74 73 20 6f 66 20 70  |"What sorts of p|
00001820  72 6f 62 6c 65 6d 73 20  61 72 65 20 63 61 75 73  |roblems are caus|
00001830  65 64 20 62 79 20 79 6f  75 72 20 22 2b 77 24 2b  |ed by your "+w$+|
00001840  22 3f 22 0d 07 8a 43 e7  20 72 25 3c 31 30 20 8c  |"?"...C. r%<10 .|
00001850  20 3d 20 22 48 6f 77 20  77 65 6c 6c 20 64 6f 20  | = "How well do |
00001860  79 6f 75 72 20 70 61 72  65 6e 74 73 20 67 65 74  |your parents get|
00001870  20 6f 6e 20 77 69 74 68  20 79 6f 75 72 20 22 2b  | on with your "+|
00001880  77 24 2b 22 3f 22 0d 07  94 3d e7 20 72 25 3d 31  |w$+"?"...=. r%=1|
00001890  30 20 8c 20 3d 20 22 59  6f 75 20 63 61 6e 20 6e  |0 . = "You can n|
000018a0  65 76 65 72 20 74 65 6c  6c 20 68 6f 77 20 74 68  |ever tell how th|
000018b0  69 6e 67 73 20 77 69 6c  6c 20 74 75 72 6e 20 6f  |ings will turn o|
000018c0  75 74 22 0d 07 9e 05 3a  0d 07 a8 0f dd 20 a4 5f  |ut"....:..... ._|
000018d0  62 61 64 28 77 24 29 0d  07 b2 1f e7 20 54 72 61  |bad(w$)..... Tra|
000018e0  63 65 25 20 8c 20 f1 20  22 42 41 44 20 46 45 45  |ce% . . "BAD FEE|
000018f0  4c 49 4e 47 53 22 0d 07  bc 25 e7 20 4e 65 67 25  |LINGS"...%. Neg%|
00001900  3d 31 20 8c 20 4e 65 67  25 3d 2d 31 20 3a 20 3d  |=1 . Neg%=-1 : =|
00001910  20 a4 5f 67 6f 6f 64 28  77 24 29 0d 07 c6 0c 72  | ._good(w$)....r|
00001920  25 3d b3 28 31 30 29 0d  07 d0 27 e7 20 72 25 3d  |%=.(10)...'. r%=|
00001930  31 20 8c 20 3d 20 22 54  72 79 20 74 6f 20 74 68  |1 . = "Try to th|
00001940  69 6e 6b 20 70 6f 73 69  74 69 76 65 21 22 0d 07  |ink positive!"..|
00001950  da 53 e7 20 72 25 3c 36  20 8c 20 3d 20 22 2f 44  |.S. r%<6 . = "/D|
00001960  6f 20 79 6f 75 72 20 66  61 6d 69 6c 79 20 67 69  |o your family gi|
00001970  76 65 20 79 6f 75 20 61  6e 79 20 73 75 70 70 6f  |ve you any suppo|
00001980  72 74 3f 2f 57 68 6f 20  69 73 20 74 68 65 20 6d  |rt?/Who is the m|
00001990  6f 73 74 20 73 75 70 70  6f 72 74 69 76 65 3f 2f  |ost supportive?/|
000019a0  22 0d 07 e4 47 3d 20 22  2f 49 73 20 74 68 65 72  |"...G= "/Is ther|
000019b0  65 20 61 6e 79 6f 6e 65  20 77 68 6f 20 63 61 6e  |e anyone who can|
000019c0  20 68 65 6c 70 20 79 6f  75 3f 2f 54 65 6c 6c 20  | help you?/Tell |
000019d0  6d 65 20 61 62 6f 75 74  20 79 6f 75 72 20 66 72  |me about your fr|
000019e0  69 65 6e 64 73 2e 2f 22  0d 07 ee 05 3a 0d 07 f8  |iends./"....:...|
000019f0  14 dd 20 a4 5f 71 75 65  73 74 69 6f 6e 28 77 24  |.. ._question(w$|
00001a00  29 0d 08 02 1b e7 20 54  72 61 63 65 25 20 8c 20  |)..... Trace% . |
00001a10  f1 20 22 51 55 45 53 54  49 4f 4e 22 0d 08 0c 0c  |. "QUESTION"....|
00001a20  72 25 3d b3 28 31 30 29  0d 08 16 23 e7 20 72 25  |r%=.(10)...#. r%|
00001a30  3c 33 20 8c 20 3d 20 22  57 68 61 74 20 64 6f 20  |<3 . = "What do |
00001a40  79 6f 75 20 74 68 69 6e  6b 3f 22 0d 08 20 45 e7  |you think?".. E.|
00001a50  20 72 25 3c 36 20 84 20  28 72 25 3c 38 20 80 20  | r%<6 . (r%<8 . |
00001a60  45 78 63 68 61 6e 67 65  73 25 3e 31 29 20 8c 20  |Exchanges%>1) . |
00001a70  3d 20 22 57 68 61 74 20  64 6f 20 79 6f 75 20 6d  |= "What do you m|
00001a80  65 61 6e 20 2d 20 27 22  2b 77 24 2b 22 27 3f 22  |ean - '"+w$+"'?"|
00001a90  0d 08 2a 20 3d 20 22 57  68 79 20 64 6f 20 79 6f  |..* = "Why do yo|
00001aa0  75 20 77 61 6e 74 20 74  6f 20 6b 6e 6f 77 3f 22  |u want to know?"|
00001ab0  0d 08 34 05 3a 0d 08 3e  12 dd 20 a4 5f 79 65 73  |..4.:..>.. ._yes|
00001ac0  5f 6e 6f 28 77 24 29 0d  08 48 19 e7 20 54 72 61  |_no(w$)..H.. Tra|
00001ad0  63 65 25 20 8c 20 f1 20  22 59 45 53 5f 4e 4f 22  |ce% . . "YES_NO"|
00001ae0  0d 08 52 10 53 6b 69 70  5f 72 65 73 74 25 3d 31  |..R.Skip_rest%=1|
00001af0  0d 08 5c 55 e7 20 77 24  3c 3e 22 79 65 73 22 20  |..\U. w$<>"yes" |
00001b00  80 20 77 24 3c 3e 22 6e  6f 22 20 8c 20 3d 20 22  |. w$<>"no" . = "|
00001b10  2f 57 68 79 20 61 72 65  6e 27 74 20 79 6f 75 20  |/Why aren't you |
00001b20  73 75 72 65 3f 2f 57 68  79 20 69 73 20 74 68 69  |sure?/Why is thi|
00001b30  73 20 69 6d 70 6f 72 74  61 6e 74 20 74 6f 20 79  |s important to y|
00001b40  6f 75 3f 2f 22 0d 08 66  21 e7 20 a4 5f 75 6e 6c  |ou?/"..f!. ._unl|
00001b50  69 73 74 28 4c 61 73 74  24 29 3e 31 20 8c 20 3d  |ist(Last$)>1 . =|
00001b60  20 4c 24 28 32 29 0d 08  70 22 3d 20 22 57 68 61  | L$(2)..p"= "Wha|
00001b70  74 20 64 6f 20 79 6f 75  20 6d 65 61 6e 20 2d 20  |t do you mean - |
00001b80  22 2b 77 24 2b 22 3f 22  0d 08 7a 05 3a 0d 08 84  |"+w$+"?"..z.:...|
00001b90  1d dd 20 f2 5f 70 72 69  6e 74 28 78 74 61 62 2c  |.. ._print(xtab,|
00001ba0  79 74 61 62 2c 6f 75 74  24 29 0d 08 8e 23 e7 20  |ytab,out$)...#. |
00001bb0  c0 6f 75 74 24 2c 31 29  3c 3e 22 20 22 20 8c 20  |.out$,1)<>" " . |
00001bc0  6f 75 74 24 3d 22 20 22  2b 6f 75 74 24 0d 08 98  |out$=" "+out$...|
00001bd0  23 e7 20 c2 6f 75 74 24  2c 31 29 3c 3e 22 20 22  |#. .out$,1)<>" "|
00001be0  20 8c 20 6f 75 74 24 3d  6f 75 74 24 2b 22 20 22  | . out$=out$+" "|
00001bf0  0d 08 a2 15 6d 25 3d a4  5f 75 6e 6c 69 73 74 28  |....m%=._unlist(|
00001c00  6f 75 74 24 29 0d 08 ac  19 6f 75 74 24 3d 22 22  |out$)....out$=""|
00001c10  20 3a 20 6c 65 6e 25 3d  78 74 61 62 2d 31 0d 08  | : len%=xtab-1..|
00001c20  b6 0f e3 20 6e 25 3d 31  20 b8 20 6d 25 0d 08 c0  |... n%=1 . m%...|
00001c30  19 6c 65 6e 25 3d 6c 65  6e 25 2b a9 28 4c 24 28  |.len%=len%+.(L$(|
00001c40  6e 25 29 29 2b 31 0d 08  ca 39 e7 20 6c 65 6e 25  |n%))+1...9. len%|
00001c50  3e 34 30 20 8c 20 6c 65  6e 25 3d a9 28 4c 24 28  |>40 . len%=.(L$(|
00001c60  6e 25 29 29 20 3a 20 4c  24 28 6e 25 29 3d bd 38  |n%)) : L$(n%)=.8|
00001c70  2b bd 31 33 2b bd 31 30  2b 4c 24 28 6e 25 29 0d  |+.13+.10+L$(n%).|
00001c80  08 d4 2d e7 20 6c 65 6e  25 3d 34 30 20 8c 20 6c  |..-. len%=40 . l|
00001c90  65 6e 25 3d 30 20 3a 20  4c 24 28 6e 25 2b 31 29  |en%=0 : L$(n%+1)|
00001ca0  3d bd 38 2b 4c 24 28 6e  25 2b 31 29 0d 08 de 05  |=.8+L$(n%+1)....|
00001cb0  ed 0d 08 e8 19 6f 75 74  24 3d a4 5f 65 6e 6c 69  |.....out$=._enli|
00001cc0  73 74 28 6d 25 2c 22 20  22 29 0d 08 f2 1b 6f 75  |st(m%," ")....ou|
00001cd0  74 24 3d c1 6f 75 74 24  2c 32 2c a9 28 6f 75 74  |t$=.out$,2,.(out|
00001ce0  24 29 2d 32 29 0d 08 fc  32 e7 20 79 74 61 62 3e  |$)-2)...2. ytab>|
00001cf0  2d 31 20 8c 20 f1 20 8a  78 74 61 62 2c 79 74 61  |-1 . . .xtab,yta|
00001d00  62 29 3b 6f 75 74 24 20  8b 20 f1 20 8a 78 74 61  |b);out$ . . .xta|
00001d10  62 29 3b 6f 75 74 24 0d  09 06 05 e1 0d 79 18 1d  |b);out$......y..|
00001d20  f4 20 4c 69 73 74 2d 50  72 6f 63 65 73 73 69 6e  |. List-Processin|
00001d30  67 20 50 61 63 6b 61 67  65 0d 79 22 15 f4 20 42  |g Package.y".. B|
00001d40  79 20 52 6f 64 20 4e 69  63 6f 6c 73 6f 6e 0d 79  |y Rod Nicolson.y|
00001d50  2c 18 f4 20 46 6f 72 20  42 42 43 20 42 2f 42 2b  |,.. For BBC B/B+|
00001d60  2f 4d 2f 43 2f 45 0d 79  36 20 f4 20 28 63 29 20  |/M/C/E.y6 . (c) |
00001d70  41 63 6f 72 6e 20 55 73  65 72 20 20 4d 61 72 63  |Acorn User  Marc|
00001d80  68 20 31 39 38 37 0d 79  40 05 3a 0d 79 4a 13 dd  |h 1987.y@.:.yJ..|
00001d90  20 a4 5f 6c 69 73 74 28  6c 69 73 74 24 29 0d 79  | ._list(list$).y|
00001da0  54 27 e7 20 c0 6c 69 73  74 24 2c 31 29 20 3d 20  |T'. .list$,1) = |
00001db0  c2 6c 69 73 74 24 2c 31  29 20 8c 20 3d 20 31 20  |.list$,1) . = 1 |
00001dc0  8b 20 3d 20 30 0d 79 5e  05 3a 0d 79 68 15 dd 20  |. = 0.y^.:.yh.. |
00001dd0  a4 5f 75 6e 6c 69 73 74  28 6c 69 73 74 24 29 0d  |._unlist(list$).|
00001de0  79 72 0d ea 20 6e 25 2c  73 65 70 24 0d 79 7c 17  |yr.. n%,sep$.y|.|
00001df0  e7 20 a9 6c 69 73 74 24  20 3c 3d 20 32 20 8c 20  |. .list$ <= 2 . |
00001e00  3d 20 30 0d 79 86 1c e7  20 a4 5f 6c 69 73 74 28  |= 0.y... ._list(|
00001e10  6c 69 73 74 24 29 3d 30  20 8c 20 3d 20 2d 31 0d  |list$)=0 . = -1.|
00001e20  79 90 19 6e 25 3d 30 20  3a 20 73 65 70 24 3d c0  |y..n%=0 : sep$=.|
00001e30  6c 69 73 74 24 2c 31 29  0d 79 9a 05 f5 0d 79 a4  |list$,1).y....y.|
00001e40  0b 6e 25 3d 6e 25 2b 31  0d 79 ae 18 4c 24 28 6e  |.n%=n%+1.y..L$(n|
00001e50  25 29 3d a4 5f 68 65 61  64 28 6c 69 73 74 24 29  |%)=._head(list$)|
00001e60  0d 79 b8 26 6c 69 73 74  24 3d c2 6c 69 73 74 24  |.y.&list$=.list$|
00001e70  2c a9 28 6c 69 73 74 24  29 2d a9 28 4c 24 28 6e  |,.(list$)-.(L$(n|
00001e80  25 29 29 2d 31 29 0d 79  c2 0f fd 20 a9 6c 69 73  |%))-1).y... .lis|
00001e90  74 24 3c 3d 32 0d 79 cc  08 3d 20 6e 25 0d 79 d6  |t$<=2.y..= n%.y.|
00001ea0  05 3a 0d 79 e0 19 dd 20  a4 5f 65 6e 6c 69 73 74  |.:.y... ._enlist|
00001eb0  28 6d 61 78 25 2c 73 65  70 24 29 0d 79 ea 0e ea  |(max%,sep$).y...|
00001ec0  20 6e 25 2c 6c 69 73 74  24 0d 79 f4 0e 6c 69 73  | n%,list$.y..lis|
00001ed0  74 24 3d 73 65 70 24 0d  79 fe 10 e3 6e 25 3d 31  |t$=sep$.y...n%=1|
00001ee0  20 b8 20 6d 61 78 25 0d  7a 08 1b 6c 69 73 74 24  | . max%.z..list$|
00001ef0  3d 6c 69 73 74 24 2b 4c  24 28 6e 25 29 2b 73 65  |=list$+L$(n%)+se|
00001f00  70 24 0d 7a 12 05 ed 0d  7a 1c 0b 3d 20 6c 69 73  |p$.z....z..= lis|
00001f10  74 24 0d 7a 26 05 3a 0d  7a 30 13 dd 20 a4 5f 68  |t$.z&.:.z0.. ._h|
00001f20  65 61 64 28 6c 69 73 74  24 29 0d 7a 3a 08 ea 20  |ead(list$).z:.. |
00001f30  6e 25 0d 7a 44 23 6e 25  3d a7 c2 6c 69 73 74 24  |n%.zD#n%=..list$|
00001f40  2c a9 6c 69 73 74 24 2d  31 29 2c c0 6c 69 73 74  |,.list$-1),.list|
00001f50  24 2c 31 29 29 0d 7a 4e  13 3d c1 6c 69 73 74 24  |$,1)).zN.=.list$|
00001f60  2c 32 2c 6e 25 2d 31 29  0d 7a 58 05 3a 0d 7a 62  |,2,n%-1).zX.:.zb|
00001f70  13 dd 20 a4 5f 74 61 69  6c 28 6c 69 73 74 24 29  |.. ._tail(list$)|
00001f80  0d 7a 6c 0d ea 20 6e 25  2c 73 65 70 24 0d 7a 76  |.zl.. n%,sep$.zv|
00001f90  12 73 65 70 24 3d c0 6c  69 73 74 24 2c 31 29 0d  |.sep$=.list$,1).|
00001fa0  7a 80 1e 6e 25 3d a7 c2  6c 69 73 74 24 2c a9 6c  |z..n%=..list$,.l|
00001fb0  69 73 74 24 2d 31 29 2c  73 65 70 24 29 0d 7a 8a  |ist$-1),sep$).z.|
00001fc0  3e e7 20 6e 25 3c a9 28  6c 69 73 74 24 29 2d 31  |>. n%<.(list$)-1|
00001fd0  20 8c 20 3d 20 73 65 70  24 2b c1 6c 69 73 74 24  | . = sep$+.list$|
00001fe0  2c 6e 25 2b 32 2c a9 6c  69 73 74 24 29 20 8b 20  |,n%+2,.list$) . |
00001ff0  3d 20 73 65 70 24 2b 73  65 70 24 0d 7a 94 05 3a  |= sep$+sep$.z..:|
00002000  0d 7a 9e 1b dd 20 a4 5f  6d 65 6d 62 65 72 28 69  |.z... ._member(i|
00002010  74 65 6d 24 2c 6c 69 73  74 24 29 0d 7a a8 10 ea  |tem$,list$).z...|
00002020  20 6e 25 2c 73 65 70 24  2c 73 24 0d 7a b2 12 73  | n%,sep$,s$.z..s|
00002030  65 70 24 3d c0 6c 69 73  74 24 2c 31 29 0d 7a bc  |ep$=.list$,1).z.|
00002040  16 73 24 3d 73 65 70 24  2b 69 74 65 6d 24 2b 73  |.s$=sep$+item$+s|
00002050  65 70 24 0d 7a c6 16 e7  20 a9 73 24 3e a9 6c 69  |ep$.z... .s$>.li|
00002060  73 74 24 20 8c 20 3d 20  30 0d 7a d0 20 6e 25 3d  |st$ . = 0.z. n%=|
00002070  a7 6c 69 73 74 24 2c 73  24 29 20 3a 20 e7 20 6e  |.list$,s$) : . n|
00002080  25 3d 30 20 8c 20 3d 20  30 0d 7a da 1c 3d 20 31  |%=0 . = 0.z..= 1|
00002090  2b a4 5f 75 6e 6c 69 73  74 28 c0 6c 69 73 74 24  |+._unlist(.list$|
000020a0  2c 6e 25 29 29 0d 7a e4  05 3a 0d 7a ee 23 dd 20  |,n%)).z..:.z.#. |
000020b0  a4 5f 61 64 64 5f 65 6c  65 6d 65 6e 74 28 65 6c  |._add_element(el|
000020c0  65 6d 65 6e 74 24 2c 6c  69 73 74 24 29 0d 7a f8  |ement$,list$).z.|
000020d0  3a e7 20 a9 6c 69 73 74  24 3d 32 20 8c 20 6c 69  |:. .list$=2 . li|
000020e0  73 74 24 3d c0 6c 69 73  74 24 2c 31 29 20 8b 20  |st$=.list$,1) . |
000020f0  e7 20 6c 69 73 74 24 3d  22 22 20 8c 20 6c 69 73  |. list$="" . lis|
00002100  74 24 3d 73 65 70 24 0d  7b 02 1b 3d 20 c0 6c 69  |t$=sep$.{..= .li|
00002110  73 74 24 2c 31 29 2b 69  74 65 6d 24 2b 6c 69 73  |st$,1)+item$+lis|
00002120  74 24 0d 7b 0c 05 3a 0d  7b 16 1f dd 20 a4 5f 61  |t$.{..:.{... ._a|
00002130  64 64 5f 6c 69 73 74 28  6c 69 73 74 31 24 2c 6c  |dd_list(list1$,l|
00002140  69 73 74 32 24 29 0d 7b  20 13 ea 20 73 65 70 32  |ist2$).{ .. sep2|
00002150  24 2c 6c 31 24 2c 6d 31  25 0d 7b 2a 14 73 65 70  |$,l1$,m1%.{*.sep|
00002160  32 24 3d c0 6c 69 73 74  32 24 2c 31 29 0d 7b 34  |2$=.list2$,1).{4|
00002170  18 6d 31 25 3d a4 5f 75  6e 6c 69 73 74 28 6c 69  |.m1%=._unlist(li|
00002180  73 74 31 24 29 0d 7b 3e  16 e7 20 6d 31 25 3d 30  |st1$).{>.. m1%=0|
00002190  20 8c 20 3d 20 6c 69 73  74 32 24 0d 7b 48 1b 6c  | . = list2$.{H.l|
000021a0  31 24 3d a4 5f 65 6e 6c  69 73 74 28 6d 31 25 2c  |1$=._enlist(m1%,|
000021b0  73 65 70 32 24 29 0d 7b  52 34 e7 20 a9 28 6c 69  |sep2$).{R4. .(li|
000021c0  73 74 32 24 29 3c 3d 32  20 8c 20 3d 20 6c 31 24  |st2$)<=2 . = l1$|
000021d0  20 8b 20 3d 20 c0 6c 31  24 2c a9 28 6c 31 24 29  | . = .l1$,.(l1$)|
000021e0  2d 31 29 2b 6c 69 73 74  32 24 0d 7b 5c 05 3a 0d  |-1)+list2$.{\.:.|
000021f0  7b 66 24 dd 20 a4 5f 69  6e 74 65 72 73 65 63 74  |{f$. ._intersect|
00002200  69 6f 6e 28 6c 69 73 74  31 24 2c 20 6c 69 73 74  |ion(list1$, list|
00002210  32 24 29 0d 7b 70 1b ea  20 6f 75 74 24 2c 6e 25  |2$).{p.. out$,n%|
00002220  2c 6d 25 2c 6a 25 2c 73  65 70 24 2c 6c 24 0d 7b  |,m%,j%,sep$,l$.{|
00002230  7a 1d 6f 75 74 24 3d 22  22 20 3a 20 73 65 70 24  |z.out$="" : sep$|
00002240  3d c0 6c 69 73 74 32 24  2c 31 29 0d 7b 84 17 6d  |=.list2$,1).{..m|
00002250  25 3d a4 5f 75 6e 6c 69  73 74 28 6c 69 73 74 31  |%=._unlist(list1|
00002260  24 29 0d 7b 8e 0f e3 20  6e 25 3d 31 20 b8 20 6d  |$).{... n%=1 . m|
00002270  25 0d 7b 98 20 e7 20 6e  25 3e 31 20 8c 20 6d 25  |%.{. . n%>1 . m%|
00002280  3d a4 5f 75 6e 6c 69 73  74 28 6c 69 73 74 31 24  |=._unlist(list1$|
00002290  29 0d 7b a2 26 6c 24 3d  4c 24 28 6e 25 29 20 3a  |).{.&l$=L$(n%) :|
000022a0  20 6a 25 3d a4 5f 6d 65  6d 62 65 72 28 6c 24 2c  | j%=._member(l$,|
000022b0  6c 69 73 74 32 24 29 0d  7b ac 1e e7 20 6a 25 3e  |list2$).{... j%>|
000022c0  30 20 8c 20 6f 75 74 24  3d 6f 75 74 24 2b 73 65  |0 . out$=out$+se|
000022d0  70 24 2b 6c 24 0d 7b b6  05 ed 0d 7b c0 1a e7 6f  |p$+l$.{....{...o|
000022e0  75 74 24 3d 22 22 20 8c  20 3d 20 73 65 70 24 2b  |ut$="" . = sep$+|
000022f0  73 65 70 24 0d 7b ca 0f  3d 20 6f 75 74 24 2b 73  |sep$.{..= out$+s|
00002300  65 70 24 0d ff                                    |ep$..|
00002305
25-08-89/ELIZA.m0
25-08-89/ELIZA.m1
25-08-89/ELIZA.m2
25-08-89/ELIZA.m4
25-08-89/ELIZA.m5