Ngôi Làng Của Gió 3D 1.1.7

Trả lại một giá trị và thoát khỏi chức năng hoặc kịch bản
[...] = optional ... = your value
return [ ... ]trở lại sử dụng các cú pháp cơ bản như in
trả lại được thiết kế chủ yếu để sử dụng trong các chức năng
Sử dụng trở lại trong Xtsripts bình thường có thể gây ra kết quả bất ngờ và thất bại
Code ví dụ:<!--parser:xtscript-->
# In functions return will print out its value and exit the function only
function test
return test value<br />
endfunction
call test
print <b>other Xtscript will be executed</b><br />
<!--/parser:xtscript-->
<!--parser:xtscript-->
# In standard Xtscript return will print out its value and exit the Xtscript parser
var $var = 1
return \$var = $var
print <b> This is not executed</b>
<!--/parser:xtscript-->
<div>Other html on the page will be executed</div>
<!--parser:xtscript-->
print <div> But other xtscripts on the page are not executed </div>
<!--/parser:xtscript-->
Code đã chạy:test value
other Xtscript will be executed
$var = 1
Other html on the page will be executed
Thucdaik
Đăng lúc:13:28 13/11/2016
Chia sẻ bài viết:
☆BÌNH LUẬN
☆ BẠN XEM CHƯA?
※ TRUNG TÂM HỖ TRỢ
Yahoo!:AdmjnWapViip@yahoo.com
Gmail:AdmjnWap@Gmail.Com