Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Search-a-list/TUSCRIPT/search-a-list.tu
Normal file
16
Task/Search-a-list/TUSCRIPT/search-a-list.tu
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
$$ MODE TUSCRIPT
|
||||
SET haystack="Zig'Zag'Wally'Ronald'Bush'Krusty'Charlie'Bush'Bozo"
|
||||
PRINT "haystack=",haystack
|
||||
LOOP needle="Washington'Bush'Wally"
|
||||
SET table =QUOTES (needle)
|
||||
BUILD S_TABLE needle = table
|
||||
IF (haystack.ct.needle) THEN
|
||||
BUILD R_TABLE needle = table
|
||||
SET position=FILTER_INDEX(haystack,needle,-)
|
||||
RELEASE R_TABLE needle
|
||||
PRINT "haystack contains ", needle, " on position(s): ",position
|
||||
ELSE
|
||||
PRINT "haystack not contains ",needle
|
||||
ENDIF
|
||||
RELEASE S_TABLE needle
|
||||
ENDLOOP
|
||||
Loading…
Add table
Add a link
Reference in a new issue