Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercise completed #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions objc-xcode-warnings-errors/FISAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,41 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

NSString *unused = @"This variable generates a warning because it is unused.";

// NSLog(@"%@", unused);
NSLog(@"%@", unused);

// NSInteger *i = 0;
// NSLog(@"i: %li", i);
NSInteger i = 12;
NSLog(@"i: %li", i);

// NSInteger x = i + 1;
// NSLog(@"x: %li", x);
NSInteger x = i + 1;
NSLog(@"x: %li", x);

NSLog(@"Anything after the return statement will not get executed.");

return YES; // this line ends the method

NSLog(@"Take note that this line doesn't print to the console.");
}

//NSString *message = @"Even though they don't belong here, the compiler won't actually complain about string literals or primitives defined outside of a method body (which is held by curly braces {...} ), but...";

//NSInteger j = 0;
//BOOL itIsKnownKhaleesi = YES;
NSString *message = @"Even though they don't belong here, the compiler won't actually complain about string literals or primitives defined outside of a method body (which is held by curly braces {...} ), but...";

NSInteger j = 0;
BOOL itIsKnownKhaleesi = YES;

//NSLog(@"...any statements containing function calls, operations, or method calls will produce errors.");
NSLog(@"...any statements containing function calls, operations, or method calls will produce errors.");




//NSLog(@"%@", message);
NSLog(@"%@", message);



//j++;
j++;

//itIsKnownKhaleesi = NO;
itIsKnownKhaleesi = NO;


//NSString *notLocal = [NSString stringWithString:@"Which means the variables above, while permitted, can't be used in the way that you intend."];
NSString *notLocal = [NSString stringWithString:@"Which means the variables above, while permitted, can't be used in the way that you intend."];
}

@end