{"id":174,"date":"2007-05-12T16:35:38","date_gmt":"2007-05-12T14:35:38","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/records-how-to-define-a-constant-record\/"},"modified":"2007-05-12T16:35:40","modified_gmt":"2007-05-12T14:35:40","slug":"records-how-to-define-a-constant-record","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/records-how-to-define-a-constant-record\/","title":{"rendered":"Records: How to define a &#8216;constant record&#8217;?"},"content":{"rendered":"<p><em>How to define constant-Records?<br \/>\n<\/em><\/p>\n<p>What if you like to have a set of constants collected into a record structure? Well, it looks crazy but it&#8217;s possible:<br \/>\n[code lang=&#8221;delphi&#8221;]type<br \/>\n  TRec = record<br \/>\n    i1 : integer;<br \/>\n    s1 : string;<br \/>\n    b1 : Boolean;<br \/>\n  end;<\/p>\n<p>const<br \/>\n  MyConstRec : TRec = (i1 : 1;<br \/>\n                       s1 : &#8216;test&#8217;;<br \/>\n                       b1 : TRUE);<\/p>\n<p>procedure TForm1.Button1Click(Sender: TObject);<br \/>\nbegin<br \/>\n  showmessage(MyConstRec.s1); \/\/will show: &#8216;test&#8217;<br \/>\nend;<br \/>\n[\/code]<\/p>\n<p>[tags]Delphi, Misc, Records[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to define constant-Records? What if you like to have a set of constants collected into a record structure? Well, it looks crazy&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[75,107,108],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-2O","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/174"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}