Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Objective C by gfghfghgfh ( 7 years ago )
- (int) sum:(int) num1 num2:(int) num2 {
    return num1 + num2;
}

int sumResult = [sampleClass max: 10 num2: 50];



double (^multiplyTwoValues)(double, double) = 
    ^(double val1, double val2) {
        return val1 * val2;
    }

double result = multiplyTwoValues(2, 4);


int var = 20;
int *ip;                // Deklaracja wskaźnika
ip = &var;           // Adres zmiennej przechowywanej przez wskaźnik

NSLog(@"Address of var variable: %x\n", &var);       // Address of var variable: 335ed51d
NSLog(@"Address stored in ip variable: %x\n", ip);  // Address stored in ip variable: 335ed51d
NSLog(@"Value of *ip variable: %d\n", *ip);               // Value of *ip variable: 20


@interface SubClass: MainClass {
    String *no2;
}

- (id)init:(String *)no2;
@end

@implementation SubClass
- (id)init:(String *)no2 {
    no2 = no2;
    return self;
}
@end


@protocol ProtocolName
@required 
// wymagane metody
@optional
// opcjonalne metody
@end


@interface ClassName (CategoryName) 
@end

 

Revise this Paste

Parent: 96957
Your Name: Code Language: