{"id":15,"date":"2023-10-03T21:14:13","date_gmt":"2023-10-03T12:14:13","guid":{"rendered":"https:\/\/yotsuba-soft.net\/?p=15"},"modified":"2023-10-03T21:17:41","modified_gmt":"2023-10-03T12:17:41","slug":"defold-operator","status":"publish","type":"post","link":"https:\/\/yotsuba-soft.net\/?p=15","title":{"rendered":"Defold(lua\u8a00\u8a9e\uff09\u306e\u6f14\u7b97\u5b50\u4e00\u89a7\u3001\u4ed6\u8a00\u8a9e\u306e\u9055\u3044\u3084\u6ce8\u610f\u70b9\u306a\u3069"},"content":{"rendered":"\n\n\n\n\n<h2>Lua\u306e\u6f14\u7b97\u5b50: \u57fa\u672c\u3068\u6ce8\u610f\u70b9<\/h2>\n\n<p>Lua\u306f\u4ed6\u306e\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u306f\u7570\u306a\u308b\u4e00\u90e8\u306e\u69cb\u6587\u3084\u7279\u5fb4\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001Lua\u306e\u57fa\u672c\u7684\u306a\u6f14\u7b97\u5b50\u3068\u305d\u306e\u4f7f\u7528\u65b9\u6cd5\u3001\u304a\u3088\u3073\u4ed6\u306e\u8a00\u8a9e\u3068\u306e\u4e3b\u306a\u9055\u3044\u3084\u6ce8\u610f\u70b9\u306b\u3064\u3044\u3066\u306e\u6982\u8981\u3067\u3059\u3002<\/p>\n\n<h3>\u57fa\u672c\u7684\u306a\u7b97\u8853\u6f14\u7b97\u5b50<\/h3>\n<ul>\n    <li>\u52a0\u7b97: <code>+<\/code><\/li>\n    <li>\u6e1b\u7b97: <code>-<\/code><\/li>\n    <li>\u4e57\u7b97: <code>*<\/code><\/li>\n    <li>\u9664\u7b97: <code>\/<\/code><\/li>\n    <li>\u4f59\u308a: <code>%<\/code><\/li>\n    <li>\u3079\u304d\u4e57: <code>^<\/code><\/li>\n<\/ul>\n\n<h3>\u6bd4\u8f03\u6f14\u7b97\u5b50<\/h3>\n<ul>\n    <li>\u7b49\u3057\u3044: <code>==<\/code><\/li>\n    <li>\u7b49\u3057\u304f\u306a\u3044: <code>~=<\/code> <span style=\"color:red;\">(\u591a\u304f\u306e\u8a00\u8a9e\u3067\u306f <code>!=<\/code> \u3068\u66f8\u304b\u308c\u307e\u3059)<\/span><\/li>\n    <li>\u3088\u308a\u5927\u304d\u3044: <code>><\/code><\/li>\n    <li>\u4ee5\u4e0a: <code>>=<\/code><\/li>\n    <li>\u3088\u308a\u5c0f\u3055\u3044: <code><<\/code><\/li>\n    <li>\u4ee5\u4e0b: <code><=<\/code><\/li>\n<\/ul>\n\n<h3>\u8ad6\u7406\u6f14\u7b97\u5b50<\/h3>\n<ul>\n    <li>AND: <code>and<\/code><\/li>\n    <li>OR: <code>or<\/code><\/li>\n    <li>NOT: <code>not<\/code><\/li>\n<\/ul>\n\n<h3>\u6587\u5b57\u5217\u7d50\u5408<\/h3>\n<ul>\n    <li>\u6587\u5b57\u5217\u7d50\u5408: <code>..<\/code> <span style=\"color:red;\">(\u591a\u304f\u306e\u8a00\u8a9e\u3067\u306f <code>+<\/code> \u304c\u4f7f\u308f\u308c\u307e\u3059)<\/span><\/li>\n<\/ul>\n\n<h3>\u6ce8\u610f\u70b9\u3068\u9055\u3044<\/h3>\n<ol>\n    <li><span style=\"color:red;\">\u52a0\u7b97\u4ee3\u5165\u3084\u6e1b\u7b97\u4ee3\u5165\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044:<\/span> Lua\u306b\u306f <code>+=<\/code> \u3084 <code>-=<\/code> \u306e\u3088\u3046\u306a\u77ed\u7e2e\u5f62\u306e\u4ee3\u5165\u6f14\u7b97\u5b50\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u3057\u305f\u304c\u3063\u3066\u3001<code>x = x + 1<\/code> \u306e\u3088\u3046\u306b\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n    <li><span style=\"color:red;\">\u7b49\u3057\u304f\u306a\u3044\u6f14\u7b97\u5b50:<\/span> Lua\u3067\u306f <code>~=<\/code> \u3092\u4f7f\u7528\u3057\u3066\u7b49\u3057\u304f\u306a\u3044\u3053\u3068\u3092\u793a\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u4ed6\u306e\u591a\u304f\u306e\u8a00\u8a9e\u3067\u306e <code>!=<\/code> \u3068\u540c\u7b49\u3067\u3059\u3002<\/li>\n    <li><span style=\"color:red;\">\u6587\u5b57\u5217\u7d50\u5408:<\/span> \u6587\u5b57\u5217\u306e\u7d50\u5408\u306b\u306f <code>..<\/code> \u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u591a\u304f\u306e\u8a00\u8a9e\u3067\u306f <code>+<\/code> \u6f14\u7b97\u5b50\u304c\u4f7f\u308f\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u304c\u3001Lua\u3067\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/li>\n    <li><span style=\"color:red;\">\u8ad6\u7406\u6f14\u7b97\u5b50:<\/span> \u8ad6\u7406\u6f14\u7b97\u5b50\u306f\u5c0f\u6587\u5b57\u306e <code>and<\/code>, <code>or<\/code>, <code>not<\/code> \u3068\u3057\u3066\u8868\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306f\u591a\u304f\u306eC\u30d9\u30fc\u30b9\u306e\u8a00\u8a9e\u306e <code>&&<\/code>, <code>||<\/code>, <code>!<\/code> \u3068\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/li>\n    <li><span style=\"color:red;\">\u6574\u6570\u9664\u7b97:<\/span> Lua 5.3\u4ee5\u964d\u3067\u306f\u3001\u6574\u6570\u9664\u7b97\u306e\u6f14\u7b97\u5b50 <code>\/\/<\/code> \u3082\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ol>\n\n<p>Lua \u306f\u305d\u306e\u30b7\u30f3\u30d7\u30eb\u3055\u304b\u3089\u591a\u304f\u306e\u30b2\u30fc\u30e0\u958b\u767a\u3084\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u30bf\u30b9\u30af\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u4ed6\u306e\u8a00\u8a9e\u306e\u7d4c\u9a13\u304c\u3042\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u9055\u3044\u3084\u7279\u5fb4\u306b\u6ce8\u610f\u3092\u6255\u3046\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002\n","protected":false},"excerpt":{"rendered":"<p>Lua\u306e\u6f14\u7b97\u5b50: \u57fa\u672c\u3068\u6ce8\u610f\u70b9 Lua\u306f\u4ed6\u306e\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u306f\u7570\u306a\u308b\u4e00\u90e8\u306e\u69cb\u6587\u3084\u7279\u5fb4\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001Lua\u306e\u57fa\u672c\u7684\u306a\u6f14\u7b97\u5b50\u3068\u305d\u306e\u4f7f\u7528\u65b9\u6cd5\u3001\u304a\u3088\u3073\u4ed6\u306e\u8a00\u8a9e\u3068\u306e\u4e3b\u306a\u9055\u3044\u3084\u6ce8\u610f\u70b9\u306b\u3064\u3044\u3066\u306e\u6982\u8981\u3067\u3059\u3002 \u57fa\u672c\u7684\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":"","_wp_rev_ctl_limit":""},"categories":[7,6],"tags":[9,8],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-defold","category-development-diary","tag-defold","tag-game-development"],"_links":{"self":[{"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":2,"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":17,"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/17"}],"wp:attachment":[{"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yotsuba-soft.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}