Soundex: Difference between revisions

Content added Content deleted
m (ANSI Standard BASIC and BBC BASIC moved to the BASIC section.)
(→‎{{header|ANSI Standard BASIC}}: Changed to {{header|ANSI BASIC}}; {{works with|Decimal BASIC}}; output.)
Line 526: Line 526:
==={{header|ANSI Standard BASIC}}===
==={{header|ANSI Standard BASIC}}===
{{trans|BBC Basic}}
{{trans|BBC Basic}}
{{works with|Decimal BASIC}}
Note: Line numbers (strict ANSI interpretation), LET and the variable after NEXT are not optional.
Note: Line numbers (strict ANSI interpretation), <code>LET</code> and the variable after <code>NEXT</code> are obligatory.

<syntaxhighlight lang="ansi">100 DECLARE EXTERNAL FUNCTION FNSoundex$
<syntaxhighlight lang="basic">100 DECLARE EXTERNAL FUNCTION FNSoundex$
110
110
120 DATA Ashcraft, Ashcroft, Gauss, Ghosh, Hilbert, Heilbronn, Lee, Lloyd
120 DATA Ashcraft, Ashcroft, Gauss, Ghosh, Hilbert, Heilbronn, Lee, Lloyd
Line 551: Line 551:
310 LET FNSoundex$ = s$(1:4)
310 LET FNSoundex$ = s$(1:4)
320 END FUNCTION</syntaxhighlight>
320 END FUNCTION</syntaxhighlight>
{{out}}
<pre>"Ashcraft" A261
"Ashcroft" A261
"Gauss" G200
"Ghosh" G200
"Hilbert" H416
"Heilbronn" H416
"Lee" L000
"Lloyd" L300
"Moses" M220
"Pfister" P236
"Robert" R163
"Rupert" R163
"Rubin" R150
"Tymczak" T522
"Soundex" S532
"Example" E251
</pre>


==={{header|BBC BASIC}}===
==={{header|BBC BASIC}}===