Rails Active Storage в рельсах API из параметров

просто.

NSString *johnsMoney = @"200";
//here johnsMoney is declared as NSString, so it will be string type.
//any thing given inside @"" will be considered as string.
//currently, johnsMoney contains 200.

NSString *marysMoney = johnsMoney;
//here marysMoney is declared as NSString, so it will be string type.
//johnsMoney is already a string. therefore, marysMoney automatically reads the
//string in johnsMoney. so currently, marysMoney will also be 200.

NSLog(@"Johns Money %@",johnsMoney);
NSLog(@"Marys Money %@",marysMoney);
//both will be printed as 200. right?

johnsMoney = @"100";
//now johnsMoney reassigned as 100.
//but still marysMoney is 200.
//there is nothing written for changing maryMoney from 200.

NSLog(@"Johns Money %@",johnsMoney);
NSLog(@"Marys Money %@",marysMoney);

, поэтому я думаю, что у вас это есть. Я не хочу думать об этом сложным образом, включая указатели.

Note:if any one feels that it is rubbish, kindly please avoid my answer. am sorry to post it. i just only vomited the pointer concept. i don't know how much correct is my answer.

0
задан Tiamon 16 January 2019 в 06:52
поделиться