zoukankan      html  css  js  c++  java
  • switch, case, default, break

    语法
    <#switch value>
      <#case refValue1>
        ...
        <#break>
      <#case refValue2>
        ...
        <#break>
      ...
      <#case refValueN>
        ...
        <#break>
      <#default>
        ...
    < /#switch>

    用例
    字符串
    <#switch being.size>
      <#case "small">
         This will be processed if it is small
         <#break>
      <#case "medium">
         This will be processed if it is medium
         <#break>
      <#case "large">
         This will be processed if it is large
         <#break>
      <#default>
         This will be processed if it is neither
    < /#switch>
    数字
    <#switch x>
      <#case x = 1>
        1
      <#case x = 2>
        2
      <#default>
        d
    < /#switch>

    如果x=1 输出 1 2, x=2输出 2, x=3 输出d

  • 相关阅读:
    程序优化
    obsidium 重定位
    Obsidium V1.3.0.4 脱壳
    SEH 栈溢出
    DWORD SHOOT
    两种堆表学习
    修改网页转向
    WireShark过滤语法
    获取系统信息学习
    怎么在 渗透无键盘 查询机
  • 原文地址:https://www.cnblogs.com/zifashaonian10000/p/4218628.html
Copyright © 2011-2022 走看看