Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
31
Task/Show-ASCII-table/FutureBasic/show-ascii-table.basic
Normal file
31
Task/Show-ASCII-table/FutureBasic/show-ascii-table.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
include "NSLog.incl"
|
||||
|
||||
local fn ASCIITable as CFStringRef
|
||||
'~'1
|
||||
NSinteger i
|
||||
CFStringRef temp
|
||||
|
||||
CFMutableStringRef mutStr = fn MutableStringWithCapacity( 0 )
|
||||
for i = 32 to 127
|
||||
temp = fn StringWithFormat( @"%c", i )
|
||||
if i == 32 then temp = @"Spc"
|
||||
if i == 127 then temp = @"Del"
|
||||
MutableStringAppendString( mutStr, fn StringWithFormat( @"%-1d : %@\n", i, temp ) )
|
||||
next
|
||||
|
||||
CFArrayRef colArr = fn StringComponentsSeparatedByString( mutStr, @"\n" )
|
||||
MutableStringSetString( mutStr, @"" )
|
||||
for i = 0 to 15
|
||||
ObjectRef col0 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i ) )
|
||||
ObjectRef col1 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i + 16 ) )
|
||||
ObjectRef col2 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i + 32 ) )
|
||||
ObjectRef col3 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i + 48 ) )
|
||||
ObjectRef col4 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i + 64 ) )
|
||||
ObjectRef col5 = fn StringUTF8String( fn ArrayObjectAtIndex( colArr, i + 80 ) )
|
||||
MutableStringAppendString( mutStr, fn StringWithFormat( @"%-10s %-10s %-10s %-10s %-10s %-10s\n", col0, col1, col2, col3, col4, col5 ) )
|
||||
next
|
||||
end fn = fn StringWithString( mutStr )
|
||||
|
||||
NSLog( @"%@", fn ASCIITable )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue