{"id":65,"date":"2007-02-04T14:32:29","date_gmt":"2007-02-04T13:32:29","guid":{"rendered":"http:\/\/bar-solutions.com\/wordpress\/?p=65"},"modified":"2007-02-04T14:32:30","modified_gmt":"2007-02-04T13:32:30","slug":"flexible-indents","status":"publish","type":"post","link":"https:\/\/blog.bar-solutions.com\/?p=65","title":{"rendered":"flexible indents"},"content":{"rendered":"<\/p>\n<p>Is it possible to have a variable indent in the generated code???  <\/p>\n<blockquote>\n<p>{_indent}object lblLabel: TLabel <br \/>{_indent}&nbsp; Top = 0 <br \/>{_indent}&nbsp; Left = 10 <br \/>{_indent}end <\/p>\n<\/blockquote>\n<p>And that that would result in something like this (with _indent set to 4 spaces):  <\/p>\n<blockquote>\n<p>&nbsp; &nbsp; object lblLabel: TLabel <br \/>&nbsp; &nbsp; &nbsp; Top = 0 <br \/>&nbsp; &nbsp; &nbsp; Left = 10 <br \/>&nbsp; &nbsp; end <\/p>\n<\/blockquote>\n<p>I was hoping this would work: [SETALIAS]_indent[TO]____ <br \/>(Where _ is a space, so I hoped _indent would be 4 spaces) <br \/>But unfortunately it didn&#8217;t&#8230; <br \/>It appears that the engine trims trailing spaces, which is kinda logical. <br \/>So, what I did is the following: <\/p>\n<blockquote>\n<p>&nbsp;[SETALIAS]_endindent[TO] <br \/>&nbsp;[SETALIAS]_indent[TO]&nbsp; &nbsp; {_endindent} <\/p>\n<\/blockquote>\n<p>That way, the engine knows when to &#8216;end&#8217; the text for the alias. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is it possible to have a variable indent in the generated code??? {_indent}object lblLabel: TLabel {_indent}&nbsp; Top = 0 {_indent}&nbsp; Left = 10 {_indent}end And that that would result in something like this (with _indent set to 4 spaces): &nbsp; &nbsp; object lblLabel: TLabel &nbsp; &nbsp; &nbsp; Top = 0 &nbsp; &nbsp; &nbsp; Left = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-codegen"],"_links":{"self":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":0,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}