首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏韩曙亮的移动开发专栏

    【iOS 开发】Objective - C 语法 之 类型转换

    */ short i = h; /* 打印 int -> short, 溢出 打印 : -25536 */ NSLog(@"i = %d", i); } } -- 编译运行 :  octopus -2:oc octopus$ clang -fobjc-arc -framework Foundation 09_typeAutoConversion.m octopus-2:oc octopus$ 38 2014-09-08 13:08:41.253 a.out[1345:507] g = & 2014-09-08 13:08:41.253 a.out[1345:507] i = -25536 octopus int e = (int)38.3838 + (int)1.3838; NSLog(@"c = %g, d = %g, e = %d", c, d, e ); } } -- 编译运行 :  octopus /a.out 2014-09-08 13:31:44.361 a.out[1391:507] c = 0, d = 0.38, e = 39 octopus-2:oc octopus$ 3.

    64930编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【iOS 开发】Objective-C 运算符

    -2:oc octopus$ clang -fobjc-arc -framework Foundation 10-arithmetic.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 10-assignment.m octopus-2:oc octopus$ octopus -2:oc octopus$ clang -fobjc-arc -framework Foundation 10-bitOperation.m octopus-2:oc octopus$ octopus -2:oc octopus$ clang -fobjc-arc -framework Foundation 10-logic.m octopus-2:oc octopus$ . framework Foundation 10-three.m octopus-2:oc octopus$ .

    53030编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【IOS 开发】Objective - C 语法 之 流程控制

    -2:oc octopus$ clang -fobjc-arc -framework Foundation 11-ifelse.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 11-switch.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 11-while.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 11-circleControl.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 11-goto.m octopus-2:oc octopus$ .

    46240编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【IOS 开发】Objective - C 入门 之 数据类型详解

    -2:ios octopus$ clang -fobjc-arc -framework Foundation 02-NSLogDemo.m octopus-2:ios octopus$ octopus -2:ios octopus$ clang -fobjc-arc -framework Foundation 03-IntDemo1.m octopus-2:ios octopus$ . -2:ios octopus$ clang -fobjc-arc -framework Foundation 03-IntDemo2.m octopus-2:ios octopus$ . -2:ios octopus$ clang -fobjc-arc -framework Foundation 05-charDemo.m octopus-2:ios octopus$ . -2:ios octopus$ clang -fobjc-arc -framework Foundation 07-enumDemo.m octopus-2:ios octopus$ .

    1.5K20编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【IOS 开发】Object - C 数组使用详解

    -2:oc octopus$ clang -fobjc-arc -framework Foundation 12-oneArray.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 12-multiArray.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 12-NSLogVSprintf.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 12-charArray.m octopus-2:oc octopus$ . -2:oc octopus$ clang -fobjc-arc -framework Foundation 12-strMethod.m octopus-2:oc octopus$ .

    56120编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【iOS 开发】Objective - C 面向对象 - 方法 | 成员变量 | 隐藏封装 | KVC | KVO | 初始化 | 多态

    -2:oc_object octopus$ clang -fobjc-arc -framework Foundation Varargs.m VarargsTest.m octopus-2:oc_object -2:oc_object octopus$ clang -fobjc-arc -framework Foundation OCPerson.m octopus-2:oc_object octopus$ -2:oc_object octopus$ clang -fobjc-arc -framework Foundation OCPerson.m octopus-2:oc_object octopus$ -2:oc_object octopus$ clang -fobjc-arc -framework Foundation OCPerson.m octopus-2:oc_object octopus$ -2:oc_object octopus$ clang -framework Foundation OCPerson.m octopus-2:oc_object octopus$ .

    1.3K10编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【IOS 开发】Object - C 面向对象 - 类 , 对象 , 成员变量 , 成员方法

    打印成员变量 NSString* stuStr = [student toString]; NSLog(@"Student is : %@", stuStr); } } -- 执行结果 :  octopus -2:oc_object octopus$ clang -fobjc-arc -framework Foundation Student.m StudentTest.m octopus-2:oc_object instance variable [-Wshadow-ivar] self->_age = _age; ^ 2 warnings generated. octopus 打印成员变量 NSString* stuStr = [student toString]; NSLog(@"Student is : %@", stuStr); } } --执行结果 :  octopus instance variable [-Wshadow-ivar] self->_age = _age; ^ 2 warnings generated. octopus

    1.4K10编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【错误记录】Mac 中 Python 报错 ( ERROR: Could not build wheels for numpy which use PEP 517 | 问题未解决 | 问题记录 )

    、解决方案 一、报错信息 ---- 首先 , 更新 pip ; 执行如下命令 : /usr/local/bin/python3 -m pip install --upgrade pip 执行结果 : octopus Successfully installed pip-21.2.4 octopus-2:~ octopus$ /usr/local/bin/python3 -m pip install numpy octopus-2:~ octopus$ /usr/local/bin/python3 -m pip install numpy Collecting numpy Using cached numpy build numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly octopus

    1.9K10编辑于 2023-03-29
  • 来自专栏韩曙亮的移动开发专栏

    【APUE】文件 I/O 操作

    va_list ap; va_start(ap, fmt); err_doit(1, errno, fmt, ap); va_end(ap); exit(0); } 执行结果 :  octopus -2:file octopus$ ls fun_lseek.c fun_lseek_hole.c fun_read_write.c octopus-2:file octopus$ gcc fun_read_write.c octopus-2:file octopus$ sudo . /a.out Password: 文件中得内容 : abcdefg octopus-2:file octopus$ ls a.out file_read_write.file fun_lseek.c fun_lseek_hole.c fun_read_write.c octopus-2:file octopus$ 四.

    61620编辑于 2023-03-27
  • 来自专栏韩曙亮的移动开发专栏

    【iOS 开发】Objective-C 入门 Xcode 环境详解

    源程序 -o 输出结果 ; -- -fobjc-arc 参数 : 启用 Object-C 的 ARC 自动技术功能; -- -o 参数 : 如果不带, 默认 输出 a.out ; 编译执行结果 :  octopus -2:ios octopus$ clang -fobjc-arc -framework Foundation 01-HelloWorld.m octopus-2:ios octopus$ ls 01- HelloWorld.m a.out octopus-2:ios octopus$ .

    3.3K20编辑于 2023-03-27
领券