{"id":567,"date":"2024-02-04T21:14:52","date_gmt":"2024-02-04T13:14:52","guid":{"rendered":"https:\/\/www.ientertech.com\/blog\/?p=567"},"modified":"2024-02-04T21:14:52","modified_gmt":"2024-02-04T13:14:52","slug":"lazarus%e6%8c%87%e9%92%88%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.ienter.com.cn\/blog\/2024\/02\/lazarus%e6%8c%87%e9%92%88%e7%b1%bb%e5%9e%8b.html","title":{"rendered":"Lazarus\u6307\u9488\u7c7b\u578b"},"content":{"rendered":"<p>    \u6307\u9488\u662f\u4e00\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u5b83\u62e5\u6709\u4e00\u4e2a\u5185\u5b58\u5730\u5740\u3002\u6307\u9488\u53ef\u4ee5\u88ab\u770b\u4f5c\u662f\u5185\u5b58\u5730\u5740\u7684\u5f15\u7528\uff0c\u5728\u5b58\u53d6\u53d8\u91cf\u65f6\u76f4\u63a5\u8bbf\u95ee\u5185\u5b58\u5730\u5740\u3002<br \/>\n    \u6307\u9488\u7c7b\u578b\u524d\u6709\u4e2a\u4e00\u7b26\u53f7(^)\uff0c\u5982\u4f60\u8981\u521b\u5efa\u4e00\u4e2a\u6307\u5411\u6574\u578b\u7684\u6307\u9488\uff0c\u8bed\u6cd5\uff1a<br \/>\n\/\/\u58f0\u660e\u7c7b\u578b<br \/>\ntype<br \/>\n  PointerType = ^integer;<br \/>\n\/\/\u58f0\u660e\u53d8\u91cf<br \/>\nVAR<br \/>\n  p:PointerType;<br \/>\n\/\/\u4f7f\u7528\u524dp\u662f\u4e00\u4e2a\u7a7a\u6307\u793a\uff0c\u6ca1\u6709\u5177\u4f53\u7684\u5730\u5740\uff0c\u9700\u8981\u901a\u8fc7\u8fc7\u7a0b\u8bed\u53e5\u5206\u914d\u4e00\u4e2a\u6574\u578b\u5355\u5143\u5e76\u628a\u8fd9\u4e2a\u5355\u5143\u7684\u5730\u5740\u5b58\u653e\u5728\u53d8\u91cfP\u4e2d<br \/>\n  New (p);<br \/>\n\/\/\u4e00\u4e2a\u6307\u793a\u53d8\u91cf\u53ea\u80fd\u5b58\u653e\u4e00\u4e2a\u5730\u5740\uff0c\u5f53\u518d\u6b21\u6267\u884cNew\uff08p\uff09\u65f6\uff0c\u53c8\u5728\u5185\u5b58\u4e2d\u65b0\u5efa\u7acb\u4e00\u4e2a\u578b\u53f7\u53d8\u91cf\u5355\u5143\uff0c\u5e76\u628a\u65b0\u7684\u5355\u5143\u5730\u5740\u5b58\u653e\u5728p\u4e2d\uff0c\u4ece\u800c\u4e22\u5931\u4e86\u65e7\u7684\u53d8\u91cf\u5355\u5143\u5730\u5740<br \/>\n\/\/\u82e5\u8981\u5b58\u53d6\u6307\u9488\u6570\u636e\uff0c\u5728\u53d8\u91cf\u540d\u540e\u52a0^\uff0c\u5982\uff0c\u6307\u9488\u7c7b\u578b\u8d4b\u503c\u64cd\u4f5c\uff1a<br \/>\np^ := 5;<br \/>\n\/\/\u6307\u9488\u4f7f\u7528\u5b8c\u540e\uff0c\u8981\u53ca\u65f6\u91ca\u653e\u5360\u7528\u7684\u5185\u5b58\u7a7a\u95f4\u3002\u5426\u5219\u7a0b\u5e8f\u6bcf\u6b21\u8fd0\u884c\u65f6\uff0c\u90fd\u5c06\u5206\u914d\u5185\u5b58\u7a7a\u95f4\uff0c\u76f4\u5230\u4f7f\u7528\u5b8c\u8ba1\u7b97\u673a\u5168\u90e8\u7a7a\u95f4\u3002\u91ca\u653e\u5185\u5b58\u7a7a\u95f4\uff0c\u4f7f\u7528\uff1a<br \/>\nDispose(p);<br \/>\n\/\/\u6307\u9488\u53ef\u4ee5\u6307\u5411\u6307\u9488\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a\u53ea\u662f\u4e00\u79cd\u6307\u9488\u6307\u5411\uff0c\u4e5f\u5c31\u662f\u8bf4\u662f\u79cd\u5730\u5740\u590d\u5236\uff0c\u5e76\u4e0d\u662f\u503c\u590d\u5236\u3002\u4e00\u65e6\u4f60\u4fee\u6539\u6570\u636e\uff0c\u5176\u4ed6\u6307\u5411\u8be5\u5730\u5740\u7684\u6307\u9488\u4e5f\u5c06\u53d8\u5316\u3002\u5982\u679c\u4f60\u91ca\u653e\u4e86\u5185\u5b58\u5730\u5740\uff0c\u5176\u4ed6\u7684\u6307\u9488\u6307\u5411\u5c06\u5931\u6548\u3002<\/p>\n<p>\/\/\u6307\u9488\u6709\u4ec0\u4e48\u597d\u5904\uff1f<br \/>\n\/\/\u4e0a\u9762\u7684\u4f8b\u5b50\u6709\u4e9b\u7275\u5f3a\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u4f7f\u7528\u6574\u578b\u800c\u4f7f\u7528\u6307\u9488\uff1f\u6307\u9488\u7684\u5f3a\u5927\u5904\u5728\u4e8e\u4e0e\u8bb0\u5f55\u76f8\u7ed3\u5408\uff0c\u5b83\u80fd\u52a8\u6001\u8c03\u6574\u6570\u636e\u7ed3\u6784\u5927\u5c0f\u3002\u5982\u679c\u4f60\u9700\u8981\u6309\u987a\u5e8f\u5b58\u50a8\u5f88\u591a\u9879\u6570\u636e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u6570\u7ec4\uff0c\u4f46\u662f\uff0c\u6570\u7ec4\u5927\u5c0f\u56fa\u5b9a\uff0c\u5982\u679c\u6ca1\u6709\u8db3\u591f\u5927\u7684\u5730\u65b9\uff0c\u4f60\u53ef\u80fd\u65e0\u6cd5\u5b58\u4e0b\u6240\u6709\u6570\u636e\u3002<br \/>\n\u52a8\u6001\u6570\u636e\u7ed3\u6784\uff0c\u4f60\u53ea\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6307\u5411\u8bb0\u5f55\u7684\u6570\u636e\u7c7b\u578b\uff0c\u50cf\uff0c\u6808\u548c\u961f\u5217\u90fd\u901a\u8fc7\u8fd9\u79cd\u7ed3\u6784\u5b9e\u73b0\uff1a<br \/>\ntype<br \/>\n  PointerType = ^RecordType;<br \/>\n  RecordType = record<br \/>\n    data : integer;<br \/>\n  next : PointerType;<br \/>\nend;<br \/>\n\/\/next\u6307\u5411\u6bcf\u4e2a\u5143\u7d20\u3002 \u94fe\u4e2d\u8bb0\u5f55\u4e3aNil\u65f6\uff0c\u5c06\u8868\u793a\u6ca1\u6709\u8bb0\u5f55\u3002<br \/>\n\uff08Nil\u662f\u4e00\u4e2a\u7a7a\u6307\u9488\uff0c\u5b83\u4e0d\u6307\u5411\u4efb\u4f55\u5bf9\u8c61\u6216\u53d8\u91cf\uff0c\u8fd9\u4e2a\u6307\u9488\u4ec0\u4e48\u4e5f\u6ca1\u6307\u5411\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6307\u9488\u662f\u4e00\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u5b83\u62e5\u6709\u4e00\u4e2a...<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[64],"class_list":["post-567","post","type-post","status-publish","format-standard","hentry","category-develop","tag-lazarus"],"_links":{"self":[{"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":1,"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":568,"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions\/568"}],"wp:attachment":[{"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/categories?post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ienter.com.cn\/blog\/wp-json\/wp\/v2\/tags?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}