From b7a6ebbd5d70d6490f88c2b6e2be01f27a66d55b Mon Sep 17 00:00:00 2001 From: "Sean P. Myrick V19.1.7.2" <65933340+seanpm2001@users.noreply.github.com> Date: Fri, 26 Nov 2021 16:55:20 -0800 Subject: [PATCH] Added the Objective-C support directory (4 files) Added the Objective-C support directory, containing 4 files in Objective-C format. --- .../Comments/Comments_InObjective-C.m | 5 +++++ .../Comments/Comments_InObjective-C_V1.m | 5 +++++ .../HelloWorld/HelloWorld_InObjective-C.m | 20 +++++++++++++++++++ .../HelloWorld/HelloWorld_InObjective-C_V1.m | 20 +++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C.m create mode 100644 Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C_V1.m create mode 100644 Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C.m create mode 100644 Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C_V1.m diff --git a/Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C.m b/Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C.m new file mode 100644 index 0000000..6557fde --- /dev/null +++ b/Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C.m @@ -0,0 +1,5 @@ +// This is a single line comment +/* This is +a multi-li +ne comment +*/ diff --git a/Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C_V1.m b/Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C_V1.m new file mode 100644 index 0000000..6557fde --- /dev/null +++ b/Learn-Objective-C/Objective-C/Comments/Comments_InObjective-C_V1.m @@ -0,0 +1,5 @@ +// This is a single line comment +/* This is +a multi-li +ne comment +*/ diff --git a/Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C.m b/Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C.m new file mode 100644 index 0000000..7802c73 --- /dev/null +++ b/Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C.m @@ -0,0 +1,20 @@ +#import + +@interface SampleClass:NSObject +- (void)sampleMethod; +@end + +@implementation SampleClass + +- (void)sampleMethod { + NSLog(@"Hello, World! \n"); +} + +@end + +int main() { + /* my first program in Objective-C */ + SampleClass *sampleClass = [[SampleClass alloc]init]; + [sampleClass sampleMethod]; + return 0; +} diff --git a/Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C_V1.m b/Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C_V1.m new file mode 100644 index 0000000..7802c73 --- /dev/null +++ b/Learn-Objective-C/Objective-C/HelloWorld/HelloWorld_InObjective-C_V1.m @@ -0,0 +1,20 @@ +#import + +@interface SampleClass:NSObject +- (void)sampleMethod; +@end + +@implementation SampleClass + +- (void)sampleMethod { + NSLog(@"Hello, World! \n"); +} + +@end + +int main() { + /* my first program in Objective-C */ + SampleClass *sampleClass = [[SampleClass alloc]init]; + [sampleClass sampleMethod]; + return 0; +}