码迷,mamicode.com
首页 >  
搜索关键字:else    ( 23991个结果
完整cmm解释器构造实践(二):词法分析
cmm是c的一个子集,保留字只有如下几个 if else while read write int real 特殊符号有如下几个 + - * / = ( ) ; { } [ ] /* */ 标识符:由数字,字母或下划线组成的字符串,且不能使关键字,第一个字母不能是数字 如果了解c很容易明白上面的是什么意思,也会明白cmm其实有的东西并不多,所以做cmm解释器相对来说比较简单。...
分类:其他好文   时间:2015-01-23 20:12:31    阅读次数:170
【c++程序】打印杨辉三角
#include using namespace std; int main() { const int n=10; int a[n][n]; int i,j; for( i=0;i<=n-1;i++) { for( j=0;j<=i;j++) { if(j==0||j==i) { a[i][j]=1; } else a[i][j]=a[...
分类:编程语言   时间:2015-01-23 20:12:15    阅读次数:140
scheme 矩阵运算
基于表: ( define ( accumulate op init seq )    ( cond        [ ( null? seq ) init ]       [ else          ( op ( car seq )              ( accumulate op init ( cdr seq ) ) ) ] ) ) ( define ( ac...
分类:其他好文   时间:2015-01-23 20:10:36    阅读次数:161
Linux下使用Shell对网络流量进行监控
#input the network name if [ -n "$1" ]; then eth_name=$1 else eth_name="eth0" fi send_o=`ifconfig $eth_name | grep bytes | awk '{print $6}' | awk -F : '{print $2}'` recv_o=`ifconfig $eth_n...
分类:系统相关   时间:2015-01-23 20:08:51    阅读次数:257
shell IFS readLine.sh
processLine() { line="$@" echo $line } FILE="" if [ "$1" == "" ]; then FILE="/dev/stdin" else FILE="$1" if [ ! -f $FILE ]; then echo "$FILE : does not exists" exit 1 ...
分类:系统相关   时间:2015-01-23 20:07:29    阅读次数:242
Android 混淆 Unknown verification type
Android工程打包sdk,导出jar已被混淆,该jar被第三方使用,混淆时出现Unknown verification type [*] in stack map frame问题,测试发现 if(){ }else{ Log.cerateLog("something"); } 其中Log public class Log { public stati...
分类:移动开发   时间:2015-01-23 18:19:11    阅读次数:166
编译器的编译基本过程
编译器最基本的功能就是把高级语言编写的代码转化为机器指令(就是01串),从这个角度来说它本质上是个转换过程。经典的编译过程主要包括: 词法分析(Lexical Analysis) 词法分析就是从输入代码中识别出各种记号(token),例如对于C语言我们就需要知道if,else等是语言的关键字,myvar是个标识,而123myvar不能被识别为一个标识。负责实现词法分析的模块有时也称为s...
分类:其他好文   时间:2015-01-23 14:43:25    阅读次数:216
[LeetCode] Compare Version Numbers 版本比较
Compare two version numbersversion1andversion1.Ifversion1>version2return 1, ifversion1 d2) return 1; else if (d1 < d2) return -1; } ...
分类:其他好文   时间:2015-01-23 14:38:17    阅读次数:139
VC关于INI文件的操作
1.查看INI文件是否存在,不存在则创建INI文件 //查看是否有First.ini文件 CFileFind fd; if(fd.FindFile(".First.int")) { MessageBox("找到文件"); } else { ...
分类:其他好文   时间:2015-01-23 12:50:27    阅读次数:190
获取当前3Ds MAX版本
昨天看到群里有人问,并贴出了飞浪大大的源码,又对比了一下自己以前写的,顿时觉得弱爆了哈哈~飞浪:fn getVer =( v = (maxversion())[1] / 1000 if v <= 9 then return v else return (2008 + v - 10)...
分类:其他好文   时间:2015-01-23 11:03:49    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!