I can define c function and variable inside Objective-C class implementation like this:
@implementation MyViewController
- (void)viewDidLoad {
[super viewDidLoad];
cfunction();
}
// variable inside class
NSString *message = @"this is c function inside objective-c class";
// c function inside class
void cfunction() {
NSLog(@"%@", message);
}
@end
RESULT
this is c function inside objective-c class
This code works without any warnings and errors.
Is it valid Objective-C code?
Is it safe to define variable and c function inside Objective-C class?
Are there documentations about this language specifications?