variable 'xxx' unsafe in 'case'的处理
问题描述:
case get(?Player_LoopTaskInfo) of
{TargetCnt, TaskStar, TaskExp} ->
ok;
_ ->
throw("not_found_loop_task_info")
end
case get(?Player_LoopTaskInfo) of
{TargetCnt, TaskStar, TaskExp} ->
ok;
_ ->
TargetCnt=0,TaskStar=0,TaskExp=0,
throw("not_found_loop_task_info")
end
2、把case语句拆成函数
{TargetCnt, TaskStar, TaskExp} = valid_task_info(get(?Player_LoopTaskInfo))
valid_task_info({_, _, _} = Info) -> Info;
valid_task_info(_) -> throw("not_found_loop_task_info").
variable 'xxx' unsafe in 'case'的处理的更多相关文章
- local variable 'xxx' referenced before assignment
这个问题很囧,在外面定义了一个变量 xxx ,然后在python的一个函数或类里面引用这个变量,并改变它的值,结果报错local variable 'xxx' referenced before as ...
- 【转】The final local variable xxx cannot be assigned, since it is defined in an enclosing type
文地址:http://blog.163.com/benben_long/blog/static/199458243201481102257544/ 本文就自己编程时候遇到的一个问题,简要描述一下,并提 ...
- 错误:variable `xxx' has initializer but incomplete type
错误:variable `xxx' has initializer but incomplete type 原因:xxx对应的类型没有找到,只把xxx声明了但是没给出定义.编译器无从确认你调用的构造函 ...
- VS2008中Run-Time Check Failure #2 - Stack around the variable 'xxx' was corrupted 错误解决方法
问题 : 在用VS2008写一段代码,算法都没有问题,但是调试的时候发现出了main之后就报 Stack around the variable 'xxx' was corrupted 的错误,后来发 ...
- Python问题:UnboundLocalError: local variable 'xxx' referenced before assignment
参考链接: http://blog.csdn.net/onlyanyz/article/details/45009697 https://www.cnblogs.com/fendou-999/p/38 ...
- variable `xxx' has initializer but incomplete type
错误:variable `xxx' has initializer but incomplete type 原因:xxx对应的类型没有找到,只把xxx声明了但是没给出定义.编译器无从确认你调用的构造函 ...
- python: local variable 'xxx' referenced before assignment
问题发现 xxx = 23 def PrintFileName(strFileName): if xxx == 23: print strFileName xxx = 24 PrintFileName ...
- local variable 'xxx' referenced before assignment(犯过同样的错)
这个问题很囧,在外面定义了一个变量 xxx ,然后在Python的一个函数里面引用这个变量,并改变它的值,结果报错local variable 'xxx' referenced before assi ...
- vs中 Stack around the variable 'XXX' was corrupted.
https://blog.csdn.net/hou09tian/article/details/75042206 把 project->配置属性->c/c++->代码生成->基 ...
随机推荐
- Sharepoint学习笔记—习题系列--70-573习题解析 -(Q91-Q93)
Question 91You have a custom user profile property named MyProperty.You need to create a Web Part th ...
- C++ RTTI
一.定义:RTTI:Run Time Type Identification ,运行时类型识别:指程序能够使用基类的指针或引用来检索其所指对象的实际派生类型.二.使用方式:C++中有两个操作符提供RT ...
- 推导大O阶方法
用大写O()来体现算法时间复杂度的记法,我们称之为大O阶记法. O(1)叫做常数阶:O(n)叫做线性阶:O(n^2)叫做平方阶. 1.用常数1取代运行时间中的所有加法常数. 2.在修改后的运行次数函 ...
- 基础学习day07---面向对象三---继承,接口与 抽象类
一.继承 1.1.继承概念 将对象的共性抽取出来.提取出一个单独的类. 继承使用复用以前的代码非常容易,能够大大的缩短开发周期,降低开发成本,同时增加程序的易维护性 继承使重一个类A能够直接使用另外一 ...
- 基础学习day05---面向对象一类,对象、封装
一.面向对象 1.1.面向对象的概念 很经典的一句话----------万物皆对象 定义:面向对象一相对面向过程而言的 面向对象和面向过程都是一种思想 面向过程-- ...
- UITableView小知识点总结
1.UITableView去除空的cell,多余不用的 在viewdidload方法里加上这一句即可 self.tableView.tableFooterView = [[UIView alloc] ...
- UISearchBar改变搜索框的高度
系统的searchBar UISearchBar的中子控件及其布局 UIView(直接子控件) frame 等于 searchBar的bounds,view的子控件及其布局 UISearchBarBa ...
- iOS开发之网络数据解析--GDataXML解析框架的使用
前言:GDataXML是google基于C语言libxml2写的第三方框架,该源码文件就一个类,看其源码,基本使用了C语言的底层的很多lib编译库代码,所以刚导入使用,会报错提示需要设置导入需要的 ...
- Android Design Support Library——TextInputLayout
前沿 上一篇介绍了NavigationView的主要使用方式,本章主要介绍TextInputLayout的使用方式. TextInputLayout——EditText悬浮标签 TextInputLa ...
- Java内存模型的历史变迁
转自:http://www.csdn.net/article/2015-05-20/2824722-Java 摘要:本文通过介绍Java的新/旧内存模型,来展示Java技术的历史变迁. 本文通过介绍J ...