ABC words: Difference between revisions

no edit summary
No edit summary
Line 1,487:
54. tabernacle
55. tablecloth</pre>
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
include "NSLog.incl"
 
local fn WordList as CFArrayRef
CFArrayRef wordList = NULL
CFURLRef url = fn URLWithString( @"http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" )
CFStringRef string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )
if ( string ) then wordList = fn StringComponentsSeparatedByCharactersInSet( string, fn CharacterSetNewlineSet )
end fn = wordList
 
void local fn ABCWords
CFMutableArrayRef words
CFArrayRef wordList
CFStringRef string
long a, b, c
wordList = fn WordList
if ( wordList )
words = fn MutableArrayWithCapacity(0)
for string in wordList
a = instr(0,string,@"a")
b = instr(0,string,@"b")
c = instr(0,string,@"c")
if ( a != NSNotFound and b != NSNotFound and c != NSNotFound and a < b and b < c )
MutableArrayAddObject( words, string )
end if
next
NSLog(@"%@",words)
else
NSLog(@"Unable to load word list")
end if
end fn
 
fn ABCWords
 
HandleEvents
</syntaxhighlight>
 
<pre style='height:20ex;'>
aback
abacus
abc
abdicate
abduct
abeyance
abject
abreact
abscess
abscissa
abscissae
absence
abstract
abstracter
abstractor
adiabatic
aerobacter
aerobic
albacore
alberich
albrecht
algebraic
alphabetic
ambiance
ambuscade
aminobenzoic
anaerobic
arabic
athabascan
auerbach
diabetic
diabolic
drawback
fabric
fabricate
flashback
halfback
iambic
lampblack
leatherback
metabolic
nabisco
paperback
parabolic
playback
prefabricate
quarterback
razorback
roadblock
sabbatical
snapback
strabismic
syllabic
tabernacle
tablecloth
</pre>
 
=={{header|Go}}==
408

edits