29 lines
658 B
Text
29 lines
658 B
Text
include "NSLog.incl"
|
|
|
|
print
|
|
// A semicolon will suppress a line feed in a print statement.
|
|
print "a, ";
|
|
print "b, ";
|
|
print "c"
|
|
|
|
print : print
|
|
|
|
// When logging, a \b (escaped b) appended to a string will suppress a line feed.
|
|
NSLog( @"d, \b" )
|
|
NSLog( @"e, \b" )
|
|
NSLog( @"f" )
|
|
|
|
long i
|
|
CFMutableStringRef mutStr
|
|
mutStr = fn MutableStringWithCapacity(0)
|
|
|
|
// Feeds and returns can be easily omitted using a mutable string
|
|
for i = 1 to 99
|
|
MutableStringAppendFormat( mutStr, @"%3ld, ", i )
|
|
if ( i mod 10 == 0 ) then MutableStringAppendString( mutStr, @"\n" )
|
|
if ( i == 99 ) then MutableStringAppendFormat( mutStr, @"%3ld", i + 1 )
|
|
next
|
|
|
|
print mutStr
|
|
|
|
HandleEvents
|