March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
|
|
@ -0,0 +1,3 @@
|
|||
a = "Frink"
|
||||
b = a + " rules!"
|
||||
println[b]
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
s = "hello"
|
||||
println(s + " there!")
|
||||
println(s * " there!")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
str := "Hello":
|
||||
newstr := cat(str,", world!"):
|
||||
str;
|
||||
newstr;
|
||||
|
|
@ -2,18 +2,19 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSString *s = @"hello";
|
||||
printf("%s%s\n", [s UTF8String], " literal");
|
||||
@autoreleasepool {
|
||||
|
||||
NSString *s2 = [s stringByAppendingString:@" literal"];
|
||||
// or, NSString *s2 = [NSString stringWithFormat:@"%@%@", s, @" literal"];
|
||||
puts([s2 UTF8String]);
|
||||
/* or */
|
||||
NSMutableString *s3 = [NSMutableString stringWithString: s];
|
||||
[s3 appendString: @" literal"];
|
||||
puts([s3 UTF8String]);
|
||||
NSString *s = @"hello";
|
||||
printf("%s%s\n", [s UTF8String], " literal");
|
||||
|
||||
[pool release];
|
||||
NSString *s2 = [s stringByAppendingString:@" literal"];
|
||||
// or, NSString *s2 = [NSString stringWithFormat:@"%@%@", s, @" literal"];
|
||||
puts([s2 UTF8String]);
|
||||
/* or */
|
||||
NSMutableString *s3 = [NSMutableString stringWithString: s];
|
||||
[s3 appendString: @" literal"];
|
||||
puts([s3 UTF8String]);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue