ABC words: Difference between revisions

→‎{{header|FutureBasic}}: Made function more efficient
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
(→‎{{header|FutureBasic}}: Made function more efficient)
Line 1,500:
 
void local fn ABCWords
CFArrayRef wordListlist
CFMutableArrayRef words
CFStringRef string
CFArrayRef wordList
CFStringReflong string a, b, c
long a, b, c
wordListlist = fn WordList
if ( list ) == NULL then NSLog( @"Unable to load word list") : exit fn
if ( wordList )
for string in wordListlist
words = fn MutableArrayWithCapacity(0)
a = instr( 0, string, @"a")
for string in wordList
if ( a == instr(0,string,@"a"NSNotFound ) then continue
b = instr(0 a, string, @"b")
if ( cb == instr(0,string,@"c"NSNotFound ) then continue
c = instr( b, string, @"c")
if ( a != NSNotFound and b != NSNotFound and c != NSNotFound and a < b and b < c )
if ( c != NSNotFound ) then MutableArrayAddObjectNSLog( words@"%@", string )
next
end if
next
NSLog(@"%@",words)
else
NSLog(@"Unable to load word list")
end if
end fn
 
68

edits