随笔分类 -  AA仓颉编程

摘要:接口定义 一个简单的接口定义如下: interface I { // 'open' modifier is optional. func f(): Unit } 接口使用关键字 interface 声明,其后是接口的标识符 I 和接口的成员。接口成员可被 open 修饰符修饰,并且 open 修饰符 阅读全文
posted @ 2024-08-04 19:58 txwtech 阅读(19) 评论(0) 推荐(0) 编辑
摘要:import serialization.serialization.* import std.math.* import encoding.json.* /* 通过实现 Serializable 接口,来实现对自定义类型的序列化和反序列化功能 */ class Abc <: Serializabl 阅读全文
posted @ 2024-08-04 19:50 txwtech 阅读(13) 评论(0) 推荐(0) 编辑
摘要:仓颉开发一个webapi接口 from net import http.ServerBuilder,http.FuncHandler main(){ let server = ServerBuilder().addr("127.8.8.1").port(8888).build()server.dis 阅读全文
posted @ 2024-08-04 19:23 txwtech 阅读(113) 评论(0) 推荐(0) 编辑
摘要:https://www.bilibili.com/video/BV1AE421A7uH?p=30 阅读全文
posted @ 2024-08-04 19:14 txwtech 阅读(9) 评论(0) 推荐(0) 编辑
摘要:T<:P仓颉泛型约束,仓颉的小于符合与冒号 阅读全文
posted @ 2024-08-04 19:08 txwtech 阅读(7) 评论(0) 推荐(0) 编辑
摘要:对不可变变量赋值,就会报错 error: cannot assign to immutable value ==> a.cj:8:20: | 8 |  case 77 => a = 'a77' [36 阅读全文
posted @ 2024-07-28 22:30 txwtech 阅读(14) 评论(0) 推荐(0) 编辑
摘要:参考:https://txwtech.blog.csdn.net/article/details/140757790 error: non-exhaustive patterns ==> a.cj:7:14: | 7  阅读全文
posted @ 2024-07-28 22:22 txwtech 阅读(11) 评论(0) 推荐(0) 编辑
摘要:https://developer.huawei.com/consumer/cn/doc/cangjie-guides-V5/identifier-V5 https://developer.huawei.com/consumer/cn/training/course/slightMooc/C1017 阅读全文
posted @ 2024-07-27 22:38 txwtech 阅读(47) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示