ios

objc格式化输出

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  //常用类型的定义
  int i =10;
  BOOL isShow=TRUE;
  float f = 3.1415926;
  char a =120;
  NSString *name =@"Himi";
  //常用打印语句
  NSLog(@"字符串:%@",name);
  NSLog(@"字符:%c",a);
  NSLog(@"布尔值:%i",isShow);
  NSLog(@"整形:%i",i);
  NSLog(@"单精度浮点数: %f",f);
  NSLog(@"精度浮点数,且只保留两位小数:%.2f",f);
  NSLog(@"科学技术法:%e",f);
  NSLog(@"科学技术法(用最简短的方式):%g",f);
  NSLog(@"同时打印两个整数:i=%i,f=%f",i,f);
%@     对象
%d, %i 整数
%u     无符整形
%f     浮点/双字
%x, %X 二进制整数
%o     八进制整数
%zu    size_t
%p     指针
%e     浮点/双字 (科学计算)
%g     浮点/双字
%s     C 字符串
%.*s   Pascal字符串
%c     字符
%C     unichar
%lld   64位长整数(long long)
%llu   无符64位长整数
%Lf    64位双字
%e     是实数,用科学计数法计的
bst g22 jinniu lilai opebet orange88 vinbet xbet yuebo zunlong shijiebei bet007 hg0088 ju111 letiantang m88 mayaba qg777 qianyiguoji sbf777 tengbohui tlc ule weilianxier waiweitouzhu xingfayule xinhaotiandi yinheyule youfayule zhongying 2018shijiebei w88 18luck 188bet beplay manbet 12bet 95zz shenbo weide1946 ca88 88bifa aomenxinpujing betway bodog bt365 bwin tongbao vwin weinisiren 88jt fenghuangyule hongyunguoji 918botiantang huanyayule jianada28 jixiangfang libo long8 hongzuyishi zuqiutouzhu