Words from neighbour ones: Difference between revisions

Added Algol 68
(Added Algol 68)
 
(10 intermediate revisions by 7 users not shown)
Line 29:
{{trans|Python}}
 
<langsyntaxhighlight lang="11l">V wordList = File(‘unixdict.txt’).read().split("\n")
 
V filteredWords = wordList.filter(chosenWord -> chosenWord.len >= 9)
Line 37:
V newWord = (0..8).map(i -> :filteredWords[@position + i][i]).join(‘’)
I newWord C filteredWords
print(newWord)</langsyntaxhighlight>
 
{{out}}
<pre>
applicate
architect
astronomy
christine
christoph
committee
committee
committee
committee
committee
composite
constrict
constrict
construct
different
extensive
greenwood
implement
improvise
intercept
interpret
interrupt
interrupt
philosoph
prescript
receptive
telephone
transcend
transcend
transport
transpose
</pre>
 
=={{header|ALGOL 68}}==
<syntaxhighlight lang="algol68">
# find words where concatenating the nth character from this and the next 8 #
# words results in another word - only words of 9 or more characters are to #
# be considered #
IF FILE input file;
STRING file name = "unixdict.txt";
open( input file, file name, stand in channel ) /= 0
THEN
# failed to open the file #
print( ( "Unable to open """ + file name + """", newline ) )
ELSE
# file opened OK #
BOOL at eof := FALSE;
# set the EOF handler for the file - notes eof has been reached and #
# returns TRUE so processing can continue #
on logical file end( input file, ( REF FILE f )BOOL: at eof := TRUE );
 
# table of possible words - there are around 8 000 9+ character words #
[ 1 : 10 000 ]STRING words; # in unixdict.txt #
 
# in-place quick sort an array of strings #
PROC s quicksort = ( REF[]STRING a, INT lb, ub )VOID:
IF ub > lb
THEN
# more than one element, so must sort #
INT left := lb;
INT right := ub;
# choosing the middle element of the array as the pivot #
STRING pivot := a[ left + ( ( right + 1 ) - left ) OVER 2 ];
WHILE
WHILE IF left <= ub THEN a[ left ] < pivot ELSE FALSE FI
DO
left +:= 1
OD;
WHILE IF right >= lb THEN a[ right ] > pivot ELSE FALSE FI
DO
right -:= 1
OD;
left <= right
DO
STRING t := a[ left ];
a[ left ] := a[ right ];
a[ right ] := t;
left +:= 1;
right -:= 1
OD;
s quicksort( a, lb, right );
s quicksort( a, left, ub )
FI # s quicksort # ;
 
# returns the length of s #
OP LENGTH = ( STRING s )INT: 1 + ( UPB s - LWB s );
 
# returns TRUE if words[ low : high ] comntains s, FALSE otherwise #
PROC is word = ( STRING s, INT low, high )BOOL:
IF high < low THEN FALSE
ELSE INT mid = ( low + high ) OVER 2;
IF words[ mid ] > s THEN is word( s, low, mid - 1 )
ELIF words[ mid ] = s THEN TRUE
ELSE is word( s, mid + 1, high )
FI
FI # is word # ;
 
INT min length = 9; # minimum length of word to consider #
INT w count := 0; # store the 9 character words #
WHILE
STRING word;
get( input file, ( word, newline ) );
NOT at eof
DO
IF LENGTH word >= min length THEN
words[ w count +:= 1 ] := word
FI
OD;
close( input file );
s quicksort( words, 1, w count ); # sort the words #
FOR i TO ( w count + 1 ) - min length DO # find the required words #
STRING c word := words[ i ][ LWB words[ i ] ];
INT w pos := i;
FOR c pos TO 8 DO
STRING w = words[ w pos +:= 1 ];
c word +:= w[ c pos + LWB words[ i ] ]
OD;
IF is word( c word, 1, w count ) THEN
print( ( c word, newline ) )
FI
OD
FI
</syntaxhighlight>
{{out}}
<pre>
Line 76 ⟶ 201:
=={{header|AppleScript}}==
===Core language===
<langsyntaxhighlight lang="applescript">on task()
-- Since the task specifically involves unixdict.txt, this code's written in
-- the knowlege that the words are on individual lines and in dictionary order.
Line 116 ⟶ 241:
end task
 
task()</langsyntaxhighlight>
 
{{output}}
<langsyntaxhighlight lang="applescript">{"applicate", "architect", "astronomy", "christine", "christoph", "committee", "composite", "constrict", "construct", "different", "extensive", "greenwood", "implement", "improvise", "intercept", "interpret", "interrupt", "philosoph", "prescript", "receptive", "telephone", "transcend", "transport", "transpose"}</langsyntaxhighlight>
 
===AppleScriptObjC===
Same output as above.
<langsyntaxhighlight lang="applescript">use AppleScript version "2.4" -- OS X 10.10 (Yosemite) or later
use framework "Foundation"
use scripting additions
Line 159 ⟶ 284:
end task
 
task()</langsyntaxhighlight>
 
=={{header|Arturo}}==
{{trans|Nim}}
<langsyntaxhighlight lang="rebol">wordset: map read.lines relative "unixdict.txt" => strip
wordset: select wordset 'word -> 9 =< size word
 
Line 177 ⟶ 302:
lastWord: new newWord
]
]</langsyntaxhighlight>
 
{{out}}
Line 207 ⟶ 332:
 
=={{header|AutoHotkey}}==
<langsyntaxhighlight AutoHotkeylang="autohotkey">FileRead, wList, % A_Desktop "\unixdict.txt"
for word in neighbour(wList)
result .= word (Mod(A_Index, 6) ? "`t" : "`n")
Line 232 ⟶ 357:
}
return oRes
}</langsyntaxhighlight>
{{out}}
<pre>applicate architect astronomy christine christoph committee
Line 240 ⟶ 365:
 
=={{header|AWK}}==
<syntaxhighlight lang="awk">
<lang AWK>
# syntax: GAWK -f WORDS_FROM_NEIGHBOUR_ONES.AWK unixdict.txt
{ if (length($0) < 9) { next }
Line 260 ⟶ 385:
exit(0)
}
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 289 ⟶ 414:
</pre>
=={{header|C}}==
<langsyntaxhighlight lang="c">#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Line 358 ⟶ 483:
free(words);
return EXIT_SUCCESS;
}</langsyntaxhighlight>
 
{{out}}
Line 389 ⟶ 514:
 
=={{header|C++}}==
<langsyntaxhighlight lang="cpp">#include <algorithm>
#include <cstdlib>
#include <fstream>
Line 427 ⟶ 552:
}
return EXIT_SUCCESS;
}</langsyntaxhighlight>
 
{{out}}
Line 460 ⟶ 585:
{{libheader| System.Classes}}
{{Trans|Java}}
<syntaxhighlight lang="delphi">
<lang Delphi>
program Words_from_neighbour_ones;
 
Line 512 ⟶ 637:
Words.Free;
readln;
end.</langsyntaxhighlight>
{{out}}
<pre> 1. applicate
Line 540 ⟶ 665:
 
=={{header|F_Sharp|F#}}==
<langsyntaxhighlight lang="fsharp">
// Words from neighbour ones. Nigel Galloway: February 11th., 2021.
let g=[|use n=System.IO.File.OpenText("unixdict.txt") in while not n.EndOfStream do yield n.ReadLine()|]|>Array.filter(fun n->n.Length>8)
g|>Array.windowed 9|>Array.map(fun n->n|>Array.mapi(fun n g->g.[n])|>System.String)|>Array.filter(fun n-> Array.contains n g)|>Array.distinct|>Array.iter(printfn "%s")
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 578 ⟶ 703:
<code><clumps></code> is the same idea except it doesn't actually store all that redundant information in memory; it's a generator that generates clumps on demand. Notice that clumps are matrices, so we can take their diagonal with <code>main-diagonal</code>.
{{works with|Factor|0.99 2020-08-14}}
<langsyntaxhighlight lang="factor">USING: formatting grouping hash-sets io.encodings.ascii io.files
kernel literals math math.matrices sequences sequences.extras
sets strings ;
Line 592 ⟶ 717:
[ wordset in? ] map-filter ! filter diagonals that are words
members ! remove duplicates
[ 1 + swap "%2d. %s\n" printf ] each-index ! print words formatted nicely</langsyntaxhighlight>
{{out}}
<pre style="height:17em">
Line 624 ⟶ 749:
=={{header|FreeBASIC}}==
{{trans|Ring}}
<langsyntaxhighlight lang="freebasic">
Open "unixdict.txt" For Input As #1
Dim As String cStr, wordList()
Line 674 ⟶ 799:
Print !"\nterminado..."
Sleep
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 712 ⟶ 837:
</pre>
 
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
#plist NSAppTransportSecurity @{NSAllowsArbitraryLoads:YES}
 
local fn WordList as CFArrayRef
CFURLRef url = fn URLWithString( @"http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" )
CFStringRef string = lcase(fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )), testStr
CFArrayRef wordArr = fn StringComponentsSeparatedByString( string, @"\n" )
CFMutableArrayRef wordsToKeep = fn MutableArrayNew
for testStr in wordArr
if len(testStr) > 8 then MutableArrayAddObject( wordsToKeep, testStr )
next
end fn = fn ArrayWithArray( wordsToKeep )
 
local fn TestWords
CFArrayRef wordArr = fn WordList
NSInteger i = 0, j = 0, count = len( wordArr )
CFMutableStringRef mutStr = fn MutableStringNew
CFMutableArrayRef mutArr = fn MutableArrayNew
for i = 0 to count - 9
CFMutableStringRef tempMutStr = fn MutableStringNew
for j = 0 to 8
MutableStringAppendString( tempMutStr, mid( wordArr[i + j], j, 1 ) )
next
if fn ArrayContainsObject( wordArr, tempMutStr ) then MutableArrayAddObject( mutArr, fn StringWithFormat( @"%@", tempMutStr ) )
next
CFArrayRef noDuplicates = fn OrderedSetArray( fn OrderedSetWithArray( mutArr ) )
MutableStringSetString( mutStr, @"" )
for i = 0 to len(noDuplicates) - 1
MutableStringAppendString( mutStr, fn StringWithFormat( @"%2ld. %@\n", i+1, noDuplicates[i] ) )
next
printf @"%@", mutStr
end fn
 
fn TestWords
 
HandleEvents
</syntaxhighlight>
{{output}}
<pre style="height:20ex;">
1. applicate
2. architect
3. astronomy
4. christine
5. christoph
6. committee
7. composite
8. constrict
9. construct
10. different
11. extensive
12. greenwood
13. implement
14. improvise
15. intercept
16. interpret
17. interrupt
18. philosoph
19. prescript
20. receptive
21. telephone
22. transcend
23. transport
24. transpose
</pre>
 
=={{header|Go}}==
<langsyntaxhighlight lang="go">package main
 
import (
Line 760 ⟶ 953:
}
}
}</langsyntaxhighlight>
 
{{out}}
Line 791 ⟶ 984:
 
=={{header|J}}==
<langsyntaxhighlight Jlang="j"> >(([-.-.)9 <@((=i.9)&(#&,)])\ 9&{.@&>@(#~ 8<#@>)) cutLF fread 'unixdict.txt'
applicate
architect
Line 815 ⟶ 1,008:
transcend
transport
transpose</langsyntaxhighlight>
 
In other words: find the set intersection (<code>([-.-.)</code>) between words and the sequences of 9 ascending position characters (<code>9 <@((=i.9)#&,])\</code> ...) from extracting the first 9 characters (<code>9{.&></code> ...) of words with more than 8 characters (<code>(#~ 8<#@>)</code>) for words from unixdict.txt (( ... )<code>cutLF fread 'unixdict.txt'</code>)
 
=={{header|Java}}==
<langsyntaxhighlight lang="java">import java.io.*;
import java.util.*;
 
Line 851 ⟶ 1,046:
}
}
}</langsyntaxhighlight>
 
{{out}}
Line 882 ⟶ 1,077:
 
=={{header|JavaScript}}==
<langsyntaxhighlight lang="javascript">
document.write(`
<p>Choose dictionary: <input id="dict" type="file"></p>
Line 911 ⟶ 1,106:
fr.readAsText(f);
}
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 919 ⟶ 1,114:
=={{header|jq}}==
 
For speed, this solution constructs a JSON object as a dictionary ($hash):<langsyntaxhighlight lang="jq">
# input: the dictionary
# $n: starting point (starting at 0)
Line 929 ⟶ 1,124:
| . as $dict
| (reduce.[] as $x ({}; .[$x]=true)) as $hash
| range(0; length-9) as $i | form_word($i) | select($hash[.])</langsyntaxhighlight>
{{out}}
<pre>["applicate","architect","astronomy","christine","christoph","committee","committee","committee","committee","committee","composite","constrict","constrict","construct","different","extensive","greenwood","implement","improvise","intercept","interpret","interrupt","interrupt","philosoph","prescript","receptive","telephone","transcend","transcend","transport","transpose"]
Line 936 ⟶ 1,131:
====Removing duplicates efficiently====
Using `def form_word`, we have only to modify the last line above:
<langsyntaxhighlight lang="jq">[inputs | select(length >= 9)]
| . as $dict
| (reduce.[] as $x ({}; .[$x]=true)) as $hash
Line 942 ⟶ 1,137:
($dict | form_word($i)) as $w
| if .hash[$w] then .hash[$w] = null | .words += [$w] else . end)
| .words</langsyntaxhighlight>
 
=={{header|Julia}}==
<langsyntaxhighlight lang="julia">function wordsfromneighbourones(wordfile::String, len = 9, colwidth = 11, numcols = 8)
println("Word source: $wordfile\n")
words = filter(w -> length(w) >= len, split(read(wordfile, String), r"\s+"))
Line 959 ⟶ 1,154:
 
wordsfromneighbourones("unixdict.txt")
</langsyntaxhighlight>{{out}}
<pre>
Word source: unixdict.txt
Line 969 ⟶ 1,164:
 
=={{header|Ksh}}==
<langsyntaxhighlight lang="ksh">
#!/bin/ksh
 
Line 1,025 ⟶ 1,220:
fi
fi
done</langsyntaxhighlight>
{{out}}<pre>
1 applicate
Line 1,053 ⟶ 1,248:
 
=={{header|Lua}}==
<langsyntaxhighlight lang="lua">wordlist, wordhash = {}, {}
for word in io.open("unixdict.txt", "r"):lines() do
if #word >= 9 then
Line 1,071 ⟶ 1,266:
print(word)
end
end</langsyntaxhighlight>
{{out}}
<pre>applicate
Line 1,106 ⟶ 1,301:
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<langsyntaxhighlight Mathematicalang="mathematica">dict = Once[Import["https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt"]];
dict //= StringSplit[#,"\n"]&;
dict //= Select[StringLength/*GreaterEqualThan[9]];
firsts9 = Characters[dict][[All,;;9]];
words = StringJoin[Diagonal[firsts9,-#]]&/@Range[0,Length[firsts9]-9];
Intersection[words,dict]</langsyntaxhighlight>
{{out}}
<pre>{"applicate", "architect", "astronomy", "christine", "christoph", "committee", "composite", "constrict", "construct", "different", "extensive", "greenwood", "implement", "improvise", "intercept", "interpret", "interrupt", "philosoph", "prescript", "receptive", "telephone", "transcend", "transport", "transpose"}</pre>
 
=={{header|Nim}}==
<langsyntaxhighlight Nimlang="nim">import sets, strutils, sugar
 
# Build list and set of words with length >= 9.
Line 1,133 ⟶ 1,328:
inc count
echo ($count).align(2), ' ', newWord
lastWord = newWord</langsyntaxhighlight>
 
{{out}}
Line 1,162 ⟶ 1,357:
 
=={{header|Perl}}==
<langsyntaxhighlight lang="perl">#!/usr/bin/perl
 
use strict; # https://rosettacode.org/wiki/Words_from_neighbour_ones
Line 1,176 ⟶ 1,371:
my $new = join '', @{^CAPTURE}, "\n";
$dict{$new} and !$seen{$new}++ and print $new;
}</langsyntaxhighlight>
{{out}}
applicate
Line 1,204 ⟶ 1,399:
 
=={{header|Phix}}==
<!--<langsyntaxhighlight Phixlang="phix">(phixonline)-->
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
<span style="color: #008080;">function</span> <span style="color: #000000;">over9</span><span style="color: #0000FF;">(</span><span style="color: #004080;">string</span> <span style="color: #000000;">word</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">return</span> <span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">word</span><span style="color: #0000FF;">)>=</span><span style="color: #000000;">9</span> <span style="color: #008080;">end</span> <span style="color: #008080;">function</span>
Line 1,211 ⟶ 1,406:
<span style="color: #004080;">sequence</span> <span style="color: #000000;">neighwords</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">unique</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">filter</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">columnize</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">apply</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">tagset</span><span style="color: #0000FF;">(</span><span style="color: #000000;">9</span><span style="color: #0000FF;">),</span><span style="color: #000000;">slicen</span><span style="color: #0000FF;">)),</span><span style="color: #008000;">"in"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">words</span><span style="color: #0000FF;">))</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%d words: %s\n"</span><span style="color: #0000FF;">,{</span><span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">neighwords</span><span style="color: #0000FF;">),</span><span style="color: #7060A8;">join</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">shorten</span><span style="color: #0000FF;">(</span><span style="color: #000000;">neighwords</span><span style="color: #0000FF;">,</span><span style="color: #008000;">""</span><span style="color: #0000FF;">,</span><span style="color: #000000;">3</span><span style="color: #0000FF;">))})</span>
<!--</langsyntaxhighlight>-->
{{out}}
<pre>
Line 1,218 ⟶ 1,413:
 
=={{header|Processing}}==
<langsyntaxhighlight Processinglang="processing">StringList words = new StringList(), found = new StringList();
for (String str : loadStrings("unixdict.txt")) {
if (str.length() >= 9) {
Line 1,235 ⟶ 1,430:
for (String word : found) {
println(word);
}</langsyntaxhighlight>
{{out}}
<pre style="height: 18em;">applicate
Line 1,265 ⟶ 1,460:
=={{header|Python}}==
Tested on Python 3+, the file download will work only if the link is still active. It is possible that you may be able to fetch the file in your browser but download via code may still fail. Check whether you are connected to a VPN, it works on open networks.
<syntaxhighlight lang="python">
<lang Python>
#Aamrun, 5th November 2021
 
Line 1,286 ⟶ 1,481:
if newWord in filteredWords:
print(newWord)
</syntaxhighlight>
</lang>
{{Output}}
Yes, there are duplicates, the task doesn't say that only unique elements should be present, hence the complete raw list will appear as below :
Line 1,322 ⟶ 1,517:
transpose
</pre>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ [] swap
behead nested swap
witheach
[ over 0 peek
over = iff
drop done
nested
dip join ]
join ] is unique ( [ --> [ )
 
 
[ over find swap found ] is has ( [ x --> b )
 
[ [] swap 9 split drop
witheach
[ i^ peek join ] ] is diagonal ( [ --> [ )
 
$ "rosetta/unixdict.txt" sharefile
drop nest$
[] [] rot witheach
[ dup size 9 < iff
drop
else
[ nested join ] ]
dup temp put
dup size 8 - times
[ dup diagonal
temp share
over has iff
[ nested
swap dip join ]
else drop
behead drop ]
temp release
drop
unique
witheach
[ echo$
i^ 4 mod 3 = iff
cr else sp ]</syntaxhighlight>
 
{{out}}
 
<pre>applicate architect astronomy christine
christoph committee composite constrict
construct different extensive greenwood
implement improvise intercept interpret
interrupt philosoph prescript receptive
telephone transcend transport transpose</pre>
 
=={{header|Raku}}==
<syntaxhighlight lang="raku" perl6line>my @words_ge_9 = 'unixdict.txt'.IO.lines.grep( *.chars >= 9 );
my %words_eq_9 = @words_ge_9 .grep( *.chars == 9 ).Set;
 
Line 1,333 ⟶ 1,580:
}
 
.say for unique @new_words;</langsyntaxhighlight>
{{out}}
<pre>
Line 1,367 ⟶ 1,614:
 
It also allows the minimum length to be specified on the command line (CL) as well as the dictionary file identifier.
<langsyntaxhighlight lang="rexx">/*REXX pgm finds words that're composed from neighbor words (within an identified dict).*/
parse arg minL iFID . /*obtain optional arguments from the CL*/
if minL=='' | minL=="," then minL= 9 /*Not specified? Then use the default.*/
Line 1,394 ⟶ 1,641:
end /*j*/
/*stick a fork in it, we're all done. */
say copies('─', 30) finds ' neighbor words found with a minimum length of ' minL</langsyntaxhighlight>
{{out|output|text=&nbsp; when using the default inputs:}}
<pre>
Line 1,428 ⟶ 1,675:
 
=={{header|Ring}}==
<langsyntaxhighlight lang="ring">
cStr = read("unixdict.txt")
wordList = str2list(cStr)
Line 1,472 ⟶ 1,719:
 
see "done..." + nl
</syntaxhighlight>
</lang>
Output:
<pre>
Line 1,502 ⟶ 1,749:
24. transpose
done...
</pre>
 
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">new_word_size = 9
well_sized = File.readlines("unixdict.txt", chomp: true).reject{|word| word.size < new_word_size}
list = well_sized.each_cons(new_word_size).filter_map do |slice|
candidate = (0...new_word_size).inject(""){|res, idx| res << slice[idx][idx] }
candidate if well_sized.include?(candidate)
end
puts list.uniq
</syntaxhighlight>
{{out}}
<pre>applicate
architect
astronomy
christine
christoph
committee
composite
constrict
construct
different
extensive
greenwood
implement
improvise
intercept
interpret
interrupt
philosoph
prescript
receptive
telephone
transcend
transport
transpose
</pre>
 
=={{header|VBScript}}==
Run it in CScript.
<syntaxhighlight lang="vb">
<lang vb>
with createobject("ADODB.Stream")
.charset ="UTF-8"
Line 1,539 ⟶ 1,822:
next
 
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 1,568 ⟶ 1,851:
</pre>
 
=={{header|V (Vlang)}}==
{{trans|AutoHotkey}}
<syntaxhighlight lang="v (vlang)">import os
 
fn main() {
Line 1,599 ⟶ 1,882:
}
return res_arr
}</langsyntaxhighlight>
 
{{out}}
Line 1,612 ⟶ 1,895:
{{libheader|Wren-sort}}
{{libheader|Wren-fmt}}
<langsyntaxhighlight ecmascriptlang="wren">import "io" for File
import "./sort" for Find
import "./fmt" for Fmt
 
var wordList = "unixdict.txt" // local copy
Line 1,628 ⟶ 1,911:
alreadyFound.add(word)
}
}</langsyntaxhighlight>
 
{{out}}
Line 1,659 ⟶ 1,942:
 
=={{header|XPL0}}==
<langsyntaxhighlight XPL0lang="xpl0">string 0; \use zero-terminated strings
int Dict(26000); \pointers to words (enough for unixdict.txt)
int DictSize; \actual number of pointers in Dict
Line 1,723 ⟶ 2,006:
until DI >= DictSize-9;
CrLf(0);
]</langsyntaxhighlight>
 
{{out}}
Line 1,734 ⟶ 2,017:
=={{header|Yabasic}}==
{{trans|FreeBASIC}}
<langsyntaxhighlight lang="yabasic">
open "unixdict.txt" for reading as #1
p = 0
Line 1,783 ⟶ 2,066:
next n
end
</syntaxhighlight>
</lang>
{{out}}
<pre>
3,021

edits