Abbreviations, automatic: Difference between revisions

m
No edit summary
Line 3,167:
This assumes a text file named "DaysOfWeek.txt" is in the same folder as the code file.
 
<syntaxhighlight lang="futurebasic">include "NSLog.incl"
include "NSLog.incl"
include resources "DaysOfWeek.txt"
 
Line 3,183 ⟶ 3,182:
end fn = weeks
 
local fn MinLengthAbbreviationMinAbbreviationLength( week as CFStringRef ) as long
CFArrayRef days
CFStringRef day1, day2, abbr
Line 3,221 ⟶ 3,220:
for week in weeks
if ( len(week) )
NSLog(@"%ld\t%@",fn MinLengthAbbreviationMinAbbreviationLength( week ),week)
else
NSLog(@"NULL")
Line 3,231 ⟶ 3,230:
fn Abbreviations
 
HandleEvents</syntaxhighlight>
</syntaxhighlight>
 
{{out}}
<pre style="height:20ex15ex;">
2 Sunday Monday Tuesday Wednesday Thursday Friday Saturday
2 Sondag Maandag Dinsdag Woensdag Donderdag Vrydag Saterdag
Line 3,336 ⟶ 3,334:
2 Killachau Atichau Quoyllurchau Illapachau Chaskachau Kuychichau Intichau
</pre>
 
 
=={{header|Go}}==
416

edits