zoukankan      html  css  js  c++  java
  • (转载)虚幻引擎3--【UnrealScript教程】章节一:19.return和goto

    return 表示从被调函数返回到主调函数继续执行,返回时可附带一个返回值,由return后面的参数指定。

    goto 是转向语句,按其英文含义就可理解 
    用法 标号: 语句; ...................... 
    goto 标号; 或者 goto 标号; ..................... 标号: 语句; 
    标号和goto必须包括处于同一个函数内 标号的写法跟变量名一样不能和关键词相同,后面必须带冒号 
    当程序执行到goto这个语句时,程序就转跳到标号后面的语句去了
     
    class MyUSGame extends actor
    placeable; 

    var int i;
    function PostBeginPlay()
    {

    `log("i must go to here");

    goto ifsentence;

    `log("i will not go here");
    ifsentence:
    if(i==1)
    {
    `log("i'm here.........................!");
    return;
    }
    `log("i'm not here.----------------------");
    }

    defaultproperties
    {
    i=1;
    }
  • 相关阅读:
    Node post请求 通常配合ajax
    Node json
    Node params和query的Get请求传参
    Node express
    java NIO FileChannel
    IO 输出 PrintStream和PrintWriter
    ByteBuffer
    分析dump
    oracle free space
    SHELL 在指定行的前/后插入指定内容
  • 原文地址:https://www.cnblogs.com/wodehao0808/p/6104778.html
Copyright © 2011-2022 走看看