码迷,mamicode.com
首页 >  
搜索关键字:if case for    ( 10657个结果
输出,变量的使用,子查询,逻辑语句,循环,case..when..then..end多分支语句,Exists(判断存在)
--------------输出----------------print 'hello world'--以文本形式输出select 'hello world'--以网格形式输出,也可以设置成以文本形式输出print 'abc'+'cde'print 3+5print 'ab'+5--出错,'ab'...
分类:其他好文   时间:2014-07-27 10:42:52    阅读次数:275
lua_gc 源码学习六
GC 中最繁杂的 mark 部分已经谈完了。剩下的东西很简单。今天一次可以写完。sweep 分两个步骤,一个是清理字符串,另一个是清理其它对象。看代码,lgc.c 573 行:case GCSsweepstring: { lu_mem old = g->totalbytes; s...
分类:其他好文   时间:2014-07-27 09:58:12    阅读次数:383
判断及循环语句结构
I.判断语句:1.if语句:A.If(){//执行语句;}B.if(){//执行语句;}else{//执行语句;}C.if(){//执行语句;}else if{//执行语句;}……else{//执行语句;}2.switch语句:switch(表达式){case 常量表达式1:语句1;case 常量表...
分类:其他好文   时间:2014-07-26 14:00:44    阅读次数:194
Swift 程序流程控制
Swift采用类同c语言的流程控制语句,if, for, for-in, while, do-while , switch, break, continue .Swift语言的Switch语句自动添加了break效果,这样你可以不用没个case后面再写break.同c语言不同,swift语言的if ...
分类:其他好文   时间:2014-07-26 00:04:56    阅读次数:365
MK新老顾问自主拜访率
use Omniture select VLR.YearMonth ,VLR.VisitorID ,VLR.ConsultantID ,VLR.Visits ,CL.LevelID ,CL.[Status] ,IfNew = case when (VLR.YearMonth=startmont...
分类:其他好文   时间:2014-07-25 16:47:11    阅读次数:223
LVS自动化添加及删除ipvsadm和后端服务器健康状态检测脚本
LVSdirector负载均衡器增加IPVSADM脚本 #vimdirector.sh #!/bin/bash #chkconfig:-8866 #description:thisscripttoaddlvsIP VIP=192.168.0.254 DIP=192.168.0.100 RIP1=192.168.0.101 RIP2=192.168.0.102 PORT=80 SCHELE=wrr LOCKFILE=/var/lock/subsys/ipvsadm case$1in st..
分类:其他好文   时间:2014-07-25 11:36:02    阅读次数:8623
[leetcode]Length of Last Word
Length of Last WordGiven a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.I...
分类:其他好文   时间:2014-07-25 02:26:04    阅读次数:322
P77
#include main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1:b++;break; } case 2:a++;b++;break; case 3:a++;b++; } printf("%d,%d\n",a,b); }...
分类:其他好文   时间:2014-07-24 23:06:53    阅读次数:217
P77 ~
#include int q1,q2,q3; void fun(long n) { q1=q2=q3=0; while(n) { switch(n%10) { case 1:q1++;break; case 2:q2++;break; case 3:q3++; } n/=10; } } main() { long n=123451123; fun(n); ...
分类:其他好文   时间:2014-07-24 23:04:43    阅读次数:271
Oracle常用语法
1,case用法SELECT CASE WHEN T.FLAG='0' THEN T.USERID WHEN T.FLAG='1' THEN T.ORGID ELSE NULLEND AS '标识'FROM XTXMXX T2,decode用法--如果FLAG等于1,则转为USERID,如果...
分类:数据库   时间:2014-07-24 22:44:23    阅读次数:281
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!