REM Wee Thomas Moyer REM Conrad Weiser HS REM TrueBASIC DIM bitstr$(20),seperatedmain$(20),answer$(20),position$(20) DO LET outputmessage$="" PRINT INPUT prompt "Input: ":main$,howmany FOR i=1 to howmany INPUT answer$(i) NEXT i FOR i=1 to len(main$) LET seperatedmain$(i)=main$[i:i] IF seperatedmain$(i)="*" then LET position$(i)="both" ELSE IF seperatedmain$(i)="1" then LET position$(i)="1" ELSE IF seperatedmain$(i)="0" then LET position$(i)="0" END IF NEXT i FOR answer=1 to howmany LET flag=0 FOR i= 1 to len(answer$(answer)) IF position$(i)="both" then LET flag=flag+1 ELSE IF position$(i)="1" then IF answer$(answer)[i:i]="1" then LET flag=flag+1 ELSE EXIT FOR END IF ELSE IF position$(i)="0" then IF answer$(answer)[i:i]="0" then LET flag=flag+1 ELSE EXIT FOR END IF END IF NEXT i IF flag=len(answer$(answer)) and answer<=howmany then LET outputmessage$=outputmessage$&str$(answer) NEXT answer IF outputmessage$="" then PRINT "None" ELSE FOR i= 1 to len(outputmessage$) PRINT " ";answer$(val(outputmessage$[i:i])); NEXT i END IF LOOP END