{"id":603,"date":"2006-05-26T10:20:00","date_gmt":"2006-05-25T22:20:00","guid":{"rendered":""},"modified":"2006-05-26T10:20:00","modified_gmt":"2006-05-25T22:20:00","slug":"","status":"publish","type":"post","link":"https:\/\/www.mudone.com\/?p=603","title":{"rendered":"Randomize \u8bed\u53e5"},"content":{"rendered":"<p>\u521d\u59cb\u5316\u968f\u673a\u6570\u751f\u6210\u5668\u3002<\/p>\n<p>Randomize [number]<\/p>\n<p>number \u53c2\u6570\u53ef\u4ee5\u662f\u4efb\u4f55\u6709\u6548\u7684\u6570\u503c\u8868\u8fbe\u5f0f\u3002<\/p>\n<p>\u8bf4\u660e<br \/>\nRandomize \u4f7f\u7528 number \u53c2\u6570\u521d\u59cb\u5316 Rnd \u51fd\u6570\u7684\u968f\u673a\u6570\u751f\u6210\u5668\uff0c\u8d4b\u7ed9\u5b83\u65b0\u7684\u79cd\u5b50\u503c\u3002\u5982\u679c\u7701\u7565 number\uff0c\u5219\u4f7f\u7528\u7cfb\u7edf\u8ba1\u65f6\u5668\u8fd4\u56de\u7684\u503c\u4f5c\u4e3a\u65b0\u7684\u79cd\u5b50\u503c\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u4f7f\u7528 Randomize\uff0c\u5219\u7b2c\u4e00\u6b21\u8c03\u7528 Rnd \u51fd\u6570\uff08\u65e0\u53c2\u6570\uff09\u65f6\uff0c\u5b83\u5c06\u4f7f\u7528\u76f8\u540c\u7684\u6570\u5b57\u4f5c\u4e3a\u79cd\u5b50\u503c\uff0c\u968f\u540e\u4f7f\u7528\u6700\u540e\u751f\u6210\u7684\u6570\u503c\u4f5c\u4e3a\u79cd\u5b50\u503c\u3002<\/p>\n<p>\u6ce8\u610f \u8981\u91cd\u590d\u968f\u673a\u6570\u7684\u5e8f\u5217\uff0c\u8bf7\u5728\u4f7f\u7528\u6570\u503c\u53c2\u6570\u8c03\u7528 Randomize \u4e4b\u524d\uff0c\u7acb\u5373\u7528\u8d1f\u503c\u53c2\u6570\u8c03\u7528 Rnd\u3002\u4f7f\u7528\u76f8\u540c\u7684 number \u503c\u7684 Randomize \u4e0d\u80fd\u91cd\u590d\u5148\u524d\u7684\u968f\u673a\u6570\u5e8f\u5217\u3002<\/p>\n<p>\u4e0b\u9762\u4f8b\u5b50\u4e3e\u4f8b\u8bf4\u660e\u5982\u4f55\u4f7f\u7528 Randomize \u8bed\u53e5: <\/p>\n<p>Dim MyValue, Response<br \/>\nRandomize &#39;\u521d\u59cb\u5316\u968f\u673a\u6570\u751f\u6210\u5668\u3002<br \/>\nDo Until Response = vbNo<br \/>\n<!--more-->   MyValue = Int((6 * Rnd) + 1)&#39; \u4ea7\u751f 1 \u5230 6 \u4e4b\u95f4\u7684\u968f\u673a\u6570\u3002<br \/>\n   MsgBox MyValue<br \/>\n   Response = MsgBox (&quot;Roll again? &quot;, vbYesNo)<br \/>\nLoop<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521d\u59cb\u5316\u968f\u673a\u6570\u751f\u6210\u5668\u3002 Randomize [number] number \u53c2\u6570\u53ef\u4ee5\u662f\u4efb\u4f55\u6709\u6548\u7684\u6570\u503c\u8868\u8fbe\u5f0f\u3002 \u8bf4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-603","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=603"}],"version-history":[{"count":0,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/603\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}