\START92\ \COMMENT=Program file dated 04/30/99, 20:20 \NAME=comptest \FILE=COMPTEST.92P () Prgm Local g,gi,gl,gil,o,t1,t2,i,j,k,m,c,t,re1,re2,npa,v,rl Define npa(ss)=Func Local p convup(ss)\->\ss Loop inString(ss," ")\->\p If p\!=\0 Then dchar(ss,p)\->\ss Else Exit EndIf EndLoop ss EndFunc Unlock dbc,dbl dbc+1\->\dbc "ltdb"&string(dbc)\->\dbl[dbc] 1\->\c {}\->\gil {}\->\gl {}\->\rl Lbl s ""\->\g ""\->\gi 0\->\o Dialog Title "Rick's Compatibility Test v5.0e by R. Coogle" Text "Select a test, please." DropDown "Options",{"Name Scan","Biorhythm Comparison","Quit"},o EndDlog NewData #("ltdb"&string(dbc)),gl,gil,rl If o=1 Then Goto name ElseIf o=2 Then Goto bios ElseIf o=3 or ok=0 Then Lock dbc,dbl ClrIO Stop EndIf Lbl res Dialog Title "RESULTS" Text "The computer predicts that\...\" Text "He "&re1&" her" Text "and she "&re2&" him." EndDlog If mid(re1,10,1)="s" or mid(re2,10,1)="s" Text "But things can change!" Goto s Lbl name ClrIO Dialog Title "Name Scanner" Text "Enter Names" Request "Guy's",g Request "Girl's",gi EndDlog If ok=0 Goto s If g="" or gi="" Goto name g\->\gl[c] gi\->\gil[c] Disp "PREPARING NAMES\...\" npa(g)\->\t1 npa(gi)\->\t2 Disp "DONE","COMPARING\...\" 1\->\i Loop mid(t1,i,1)\->\t 1\->\j 1\->\k false\->\m Output 24,72,i Loop If inString(t2,t)=0 Exit If mid(t2,j,1)=t Then dchar(t2,j)\->\t2 true\->\m j-1\->\j EndIf j+1\->\j If j>dim(t2) Exit EndLoop Loop If ?m Exit If mid(t1,k,1)=t Then dchar(t1,k)\->\t1 k-1\->\k EndIf k+1\->\k If k>dim(t1) Exit EndLoop If ?m i+1\->\i If i>dim(t1) Exit EndLoop {mod(dim(t1),4),mod(dim(t2),4)}\->\t1 2\->\i While i\!=\0 "re"&string(i)\->\v If t1[i]=1 Then "is in love with"\->\#v ElseIf t1[i]=2 Then "wants to stay away from"\->\#v ElseIf t1[i]=3 Then "wants to be friends with"\->\#v ElseIf t1[i]=0 Then "wants to marry"\->\#v EndIf i-1\->\i EndWhile re1&"-"&re2\->\rl[c] c+1\->\c Goto res Lbl bios Dialog Title "Biorhythm Comparison" Text "Enter names" Request "Guy's",g Request "Girl's",gi EndDlog If ok=0 Goto s If g="" or gi="" Goto bios g\->\gl[c] gi\->\gil[c] \(-)\360\->\xmin 360\->\xmax 180\->\xscl \(-)\1.6\->\ymin 1.6\->\ymax 0.5\->\yscl ClrDraw PxlText "1st-"&g,0,0 DrawFunc sin(x*dim(g)) PxlText "2nd-"&gi,90,0 DrawFunc sin(x*dim(gi)) Pause If dim(g)=dim(gi) Then Text "IT'S A PERFECT MATCH!" Else Text "Results are inconclusive" EndIf "B"\->\rl[c] c+1\->\c Goto s EndPrgm \STOP92\